Dense movement with embedded sparse action-type representations in the output layer of motor cortex

Motor cortex generates output necessary for the execution of a wide range of motor behaviours. Although neural representations of movement have been described throughout motor cortex, how population activity in output layers relates to the execution of distinct motor actions is less well explored. To address this, we imaged layer 5B population activity in mice performing a two-action forelimb task. We found most neurons convey a generalised movement signal, with action-type-specific signalling restricted to relatively small, spatially intermingled subpopulations of neurons. Deep layer population dynamics largely reflect dense, action-invariant signals that correlate with movement timing, while embedded sparse action-type representations reflect distinct forelimb actions. We suggest that sparse coding of action-type enhances the number of possible output configurations necessary for behavioural flexibility and the execution of a wide repertoire of behavioural actions.


Abstract:
Motor cortex generates output necessary for the execution of a wide range of motor behaviours. Although neural representations of movement have been described throughout motor cortex, how population activity in output layers relates to the execution of distinct motor actions is less well explored. To address this, we imaged layer 5B population activity in mice performing a two-action forelimb task. We found most neurons convey a generalised movement signal, with action-type-specific signalling restricted to relatively small, spatially intermingled subpopulations of neurons. Deep layer population dynamics largely reflect dense, action-invariant signals that correlate with movement timing, while embedded sparse action-type representations reflect distinct forelimb actions. We suggest that sparse coding of action-type enhances the number of possible output configurations necessary for behavioural flexibility and the execution of a wide repertoire of behavioural actions.
Recent advances in viral tools and optical imaging have enabled access to laminar-specific spatiotemporal dynamics of interconnected neuronal populations in rodent motor cortex (Park et al., 2019;Peters et al., 2014;Peters et al., 2017;Wang et al., 2017). During the execution of single forelimb actions, principal neurons in both superficial and deep layers display dense activity patterns that causally relate to the initiation and/or ongoing evolution of movements (Dacre et al., 2019;Estebanez et al., 2017;Hira et al., 2013;Isomura et al., 2009;Levy et al., 2020;Park et al., 2019;Sauerbrei et al., 2019;Wang et al., 2017). These reproducible, laminar-specific activity patterns emerge across motor learning and correlate with enhanced limb coordination (Laubach et al., 2000;Masamizu et al., 2014;Peters et al., 2014;Peters et al., 2017). But whether deep layer cortical activity patterns represent specific actions or a more generalised motor signal is still in debate. For example, mice performing skilled reaches with a single endpoint trajectory display dense motor cortex activity with >70% of neurons encoding task-related movement (Sauerbrei et al., 2019), whereas multi-directional centre-out forelimb reaches appear to be encoded by sparse action-specific activity in superficial layers (Galiñanes et al., 2018). To address this issue, we sought to investigate how action representations are organised in one of the main output layers of primary motor cortex, layer 5B, since its output targets subcortical, brainstem and spinal cord circuits necessary for the selection and execution of motor actions (Esposito et al., 2014;Kita and Kita, 2012;Shepherd, 2013;Wang et al., 2017).
We performed deep-layer 2-photon calcium imaging in the caudal forelimb area (CFA) of mice trained to perform an alternating abduction / adduction lever task. By combining population imaging with single neuron / population-based classifiers and dimensionality reduction, we show that layer 5B neurons display dense movement but sparse action-type representations.
Neurons conveying action-type-specific information displayed uncorrelated activity patterns that spanned the entire movement period and were spatially intermingled within forelimb motor cortical microcircuits. Our findings have important implications for understanding the functional organisation and coding of action-specific information in the output layers of rodent motor cortex.

Results
To explore different models of action representation ( Figure 1A) (Dombeck et al., 2009;Galiñanes et al., 2018;Harrison et al., 2012;Hira et al., 2015;Sauerbrei et al., 2019), we first developed a cued linear abduction / adduction lever task for mice. The task design, incorporating two diametrically opposing actions (abduction -extension of the forelimb away from the body vs adduction -retraction of the limb towards the body), required mice to push or pull a horizontal lever 4 mm upon presentation of a 6 kHz auditory cue ( Figure 1B and C).
By incorporating two opposing actions we aimed to maximise differences in forelimb biomechanics, muscle activation and neural activity patterns (Georgopoulos et al., 1982) Video 1). To confirm motor cortical output was required for both actions, we focally injected the GABAA receptor agonist muscimol centred on the caudal forelimb area (Dacre et al., 2019;Schiemann et al., 2015). By applying muscimol during behavioural engagement we could assess the immediate effects of CFA inactivation 5-15 mins after drug injection ( Figure 1G).
Neural responses displaying action bias were classified into six different types including both positive and negative changes in ∆F/F0, consistent with bidirectional action-specific tuning of neural activity (Georgopoulos et al., 1982). The majority of action bias neurons (76%) showed significant changes in ∆F/F0 for both actions, while only 24% (43/181 neurons) displayed action selectivity (i.e. significant change in ∆F/F0 for one action, with no response for the opposing action) (Supplementary Figure 2A). In terms of spatial organisation, action bias neurons were found in all FOVs and were spatially intermingled with non-bias neurons ( Figure   2F and G). Although our task design required mice to execute actions from two different starting positions, action bias was in general not driven by postural differences (seen as differences in inter-trial baseline ∆F/F0) but rather reflected the type of movement being executed (Supplementary Figure 2B and C). To challenge our physiology-based classification of action bias, we adopted an unbiased, data-driven approach using a Gaussian Naïve Bayes classifier to identify whether action type could be decoded from the activity of individual layer 5B neurons ( Figure 2H and I). We found that ~70% of neurons that displayed action bias had decoding accuracy scores above chance (

L5B
Given the high trial-to-trial variability in ∆F/F0 and resultant moderate decoding scores in individual neurons (see Figure 2I), we reasoned that population responses could provide a more robust movement-related signal that would enhance decoding of action type (Levy et al., 2020;Masamizu et al., 2014;Wei et al., 2019). By applying logistic regression ( Figure   (A) Population decoding of action-type. Trial-to-trial ∆F/F 0 for all neurons in a field-of-view (FOV) were used to calculate the population decoding accuracy (DA) using logistic regression (see Methods). (B) Box-and-whisker plots showing the median, inter uartile range and range of single cell and population DA (n = 12 FOVs, N = 6 mice, = 1, = -2.2, P = 2.8x10 -2 , ilcoxon Signed-rank test). Black dots represent individual mice. Single cell DA accuracy (orange) were calculated using a aussian na ve Bayes classifier, population DA averages were calculated using logistic regression (brown). (C) Mean population DA for all neurons or after removal of 10-50% neurons in order from high to low single cell decoding accuracy ( Figure 2 ). Red shaded area depicts the 95% C based on shuffled data. Dashed line represents onset of movement. (D) Change in maximum population decoding accuracy for an example FOV after the se uential removal of neurons in order from high (orange) to low (grey) single cell decoding accuracy ( Figure 2 ). Thick line represents mean and 95% C . Red shaded area depicts the 95% C based on shuffled data. (E) Change in maximum population decoding accuracy for an example FOV after the random removal of individual neurons. Thick line represents mean and 95% C . Red shaded area depicts the 95% C based on shuffled data. (F) Box-and-whisker plots showing the median, inter uartile range and range for ordered (high-to-low decoding accuracy) versus random removal of neurons (n = 12 FOVs, N = 6 mice, = 1, = -2.2, P = 2.8x10 -2 , ilcoxon Signed-rank test). Black dots represent individual mice. (G Top, xample trajectories over time of 4 principal components (PC) for abduction (purple) and adduction (blue) trials from an example FOV. Bo o , discrimination index (d ) calculated from the corresponding PCs. Thick line represents mean and 95% C . Dashed lines represent movement onset. (H Change in maximum d for an example FOV after the se uential removal of neurons in order from high (orange) to low (grey) single cell decoding accuracy ( Figure 2 ). xample is from PC 7 ( Figure 3 ) the PC with the highest significant d value in this FOV. Thick line represents mean and 95% C . Red dashed line depicts the 95% C based on shuffled data. (I Change in maximum d for an example FOV after the random removal of individual neurons. Thick line represents mean and 95% C . Red dashed line depicts the 95% C based on shuffled data. (J Box-and-whisker plots showing the median, inter uartile range and range for se uential (high-to-low decoding accuracy) versus random removal of neurons (N = 6 mice, = 1, = -2.2, = 3.1x10 -2 , ilcoxon Signed-rank test). Black dots represent individual mice.  Figure 3E and F). To further explore the underlying structure of layer 5B population activity, we employed principal component analysis (Churchland et al., 2012;Churchland et al., 2010;Cunningham and Yu, 2014;Kaufman et al., 2014;Stopfer et al., 2003). For the leading 16 principal components of the population activity, we compared the difference between abduction and adduction trials, in order to compute a discrimination index (d') ( Figure  . Together, these results indicate that while action-type can be decoded from population activity, this is dependent on a relatively small proportion of high decoding accuracy neurons that contribute a small proportion of the overall variance.
Functional clustering of neurons appears to be a common feature of population activity in motor cortex (Amirikian and Georgopoulos, 2003;Cheney et al., 1985;Dombeck et al., 2009;Georgopoulos et al., 2007;Harrison et al., 2012;Hira et al., 2013;Hira et al., 2015;Isomura et al., 2009;Jones and Wise, 1977;Komiyama et al., 2010;Wang et al., 2017). We examined the spatiotemporal organization of high decoding accuracy neurons and found that within each FOV the onset of ∆F/F0 changes were first observed ~300 ms prior to movement, consistent with a role in preparation / initiation (Dacre et al., 2019;Estebanez et al., 2017;Isomura et al., 2009;Li et al., 2015a), and tiled the movement period up to reward delivery (~1-1. Confidence intervals provide a lower bound indication of cluster size such that, if present, spatial clusters based on decoding accuracy would have to be less than ~50µm. Thus, layer 5B neurons that convey action-type information appear to be temporally and spatially heterogeneous.

Discussion
Volitional forelimb movements are thought to be represented by relatively dense activity patterns in both superficial and deep layers of motor cortex (Dacre et al., 2019;Estebanez et al., 2017;Hira et al., 2013;Isomura et al., 2009;Levy et al., 2020;Park et al., 2019;Sauerbrei et al., 2019;Wang et al., 2017), but whether these patterns represent specific actions (Galiñanes et al., 2018) or a more generalised motor signal (Kaufman et al., 2016) remains unresolved. By combining population imaging with single neuron / population-based classifiers and dimensionality reduction in mice, we find that most layer 5B neurons display actioninvariant signalling, while action-specific representations are restricted to sparse, spatially heterogeneous subpopulations of neurons. Our findings provide constraints on models of spatiotemporal movement representations ( Figure 4F), developing our understanding of how action-specific information is organized in the output layers of motor cortex.
In rodents, volitional forelimb movements such as reach-to-grasp (Estebanez et al., 2017;Galiñanes et al., 2018;Guo et al., 2015;Levy et al., 2020;Sauerbrei et al., 2019;Wang et al., 2017) or pulling / pushing a grasped lever (Dacre et al., 2019;Hira et al., 2013;Isomura et al., 2009;Miri et al., 2017;Morandell and Huber, 2017;Park et al., 2019) have been associated with widespread, bidirectional neuronal modulation in both superficial and deep layers of sensorimotor cortex, driven by long-range inputs from motor thalamus (Dacre et al., 2019;Sauerbrei et al., 2019;Tanaka et al., 2018). Both excitatory and inhibitory neurons display dense task-related activity which emerges across learning and correlates with enhanced limb coordination (Hwang et al., 2019;Laubach et al., 2000;Masamizu et al., 2014;Peters et al., 2014). Disrupting this activity affects limb kinematics suggesting dense cortical activity may be a common cortical motif representing specific motor actions (Gao et al., 2018;Guo et al., 2015;Li et al., 2015b;Sauerbrei et al., 2019). Our data challenge this view, in that most layer 5B neurons display similar activity patterns irrespective of action-type, indicative of a more generalised motor signal that conveys information necessary for movement, but not for specific actions. Action-invariant signals likely provide a generic timing signal, triggering statedependent switching from stable neural dynamics during rest towards oscillatory dynamics that underpin movement initiation and execution (Churchland et al., 2010;Kaufman et al., 2014;Kaufman et al., 2016;Kurtzer et al., 2005) and similar to condition-invariant population transitions observed in recurrent neural networks trained to recapitulate complex muscle patterns in reaching primates (Sussillo et al., 2015). Since the cerebellar thalamocortical pathway conveys timing signals, which when disrupted affects movement initiation (Dacre et al., 2019;Sauerbrei et al., 2019;Thach, 1978), action-invariant signalling in cortex could reflect a generic broadcast signal from the cerebellum signalling the intention to move, irrespective of action type. This broadcast signal likely combines with long-range actionspecific inputs targeted to specific subpopulations of neurons to generate embedded sparse action-type representations. In addition, action-invariant signalling may also provide online input to downstream subcortical controllers to ensure maintained limb position in the absence of motor commands necessary for executing volitional movements (Albert et al., 2020;Kaufman et al., 2016). It will be interesting in the future to apply methods to selectively disrupt action-dependent and action-invariant signalling to explore their contribution to postural control and limb kinematics across multiple distinct actions.
Within layer 5B, we found that decoding of action-type was restricted to a subpopulation of neurons which could reflect routing of action information through specific output channels (Biane et al., 2016;Economo et al., 2018;Oswald et al., 2013;Park et al., 2019;Ueno et al., 2018;Wang et al., 2011;Wang et al., 2017). Similar activity patterns have also been observed in layer 5 projection neurons in anterior lateral motor cortex -a possible homologue of premotor cortex in primates -where distributed preparatory activity in intratelencephalic neurons converts to motor commands in pyramidal tract neurons for directional licking (Chen et al., 2017;Li et al., 2015a;Svoboda and Li, 2018). Although we did not identify the projection targets of high decoding accuracy neurons in this study, dense movement representations with sparse activation of deep layer projection neurons may be a generalised organising principle for channelling action-specific information during the planning and execution of volitional movements. Such activity patterns could be directly inherited from powerful top-down inputs from upper layers of motor cortex (Galiñanes et al., 2018;Weiler et al., 2008), driven by direct or indirect ascending input from the motor thalamus (Dacre et al., 2019;Gaidica et al., 2018;Hooks et al., 2013;Sauerbrei et al., 2019) or shaped by convergent input from multiple cortical and subcortical pathways conveying action-specific information (Hooks et al., 2013;Hooks et al., 2018). The spatiotemporal heterogeneity of action-specific activity in layer 5B differs from models that emphasise spatial clustering in primates (Amirikian and Georgopoulos, 2003;Cheney et al., 1985;Georgopoulos et al., 2007;Jones and Wise, 1977) and superficial layers of rodent motor cortex (Dombeck et al., 2009;Hira et al., 2013;Hira et al., 2015;Komiyama et al., 2010). The reason for these differences remains unclear but may reflect laminar-specific differences in functional connectivity that facilitate routing of information through distinct cortical output channels (Biane et al., 2016;Economo et al., 2018;Oswald et al., 2013;Park et al., 2019;Ueno et al., 2018;Wang et al., 2011;Wang et al., 2017) or task-specific differences in movement representations that relate to voluntary actions (e.g. licking, object manipulation or reaching) (Galiñanes et al., 2018;Isomura et al., 2009;Li et al., 2015a). Functional anatomical mapping of input-output transformations in identified layer 5B projection neurons will be a necessary next step towards building a mechanistic understanding of how action-specific information propagates through deep layers of motor cortex.
What is the computational advantage of sparse action representations as a coding strategy?
In deep layers of cortex, intratelencephalic neurons constitute a major source of input to the dorsolateral striatum controlling action selection and vigour (Panigrahi et al., 2015;Park et al., 2020;Shepherd, 2013;Yttri and Dudman, 2016), while pyramidal tract neurons project to brainstem (Esposito et al., 2014) and spinal cord circuits involved in movement execution (Basista and Yoshida, 2020;Cheney and Fetz, 1980;Economo et al., 2018;Ueno et al., 2018;Wang et al., 2017). Flexible, sparse recruitment, via long-range inputs (Hooks et al., 2013) and hierarchical input-output connectivity (Kiritani et al., 2012;Shepherd, 2013;Weiler et al., 2008) of intratelencephalic and pyramidal tract neurons conveying action-specific information would greatly enhance the number of possible output configurations necessary to realise a large repertoire of kinematic representations. Our work suggests that deep-layer sparse cortical representations embedded within dense action-invariant signalling may be an organising principle that could ensure behavioural flexibility across motor actions. Further work exploring how sparse cortical codes influence downstream motor areas will be essential for understanding how cortex controls the planning and execution of distinct motor actions.

Animal husbandry and general surgery
Male adult C57BL/6J wild-type mice (5-12 weeks old, 20-30g, 1-4 animals per cage) were maintained on a reversed 12:12 hour light:dark cycle and provided ad libitum access to food and water as well as environmental enrichment. All experiments and procedures were (0.05 mg/kg) and either carprofen (4 mg/kg) or dexamethasone (2 mg/kg) for pain relief and to reduce inflammation. At 24 and 48 hours Carprofen (4 mg/kg) was administered for postoperative pain relief. Craniotomies, centred on 1.6 mm lateral, 0.6 mm rostral relative to bregma, were performed in a stereotactic frame (David Kopf Instruments, CA, USA) using a hand-held dentist drill with 0.5 mm burr. A small lightweight headplate (0.5 g) was implanted on the surface of the skull using cyanoacrylate glue and dental cement (Lang Dental, IL, USA) and mice were left for at least 48 hours to recover.

Behavioural training
After recovery from head plate surgery, mice were handled extensively before being head restrained and habituated to a custom forelimb lever abduction-adduction behavioural setup.
Mice were trained to perform two diametrically opposing movements -a 4mm abduction (extension of the forelimb away from the body) or adduction (retraction of the forelimb towards the body) -in response to a 6 kHz auditory cue to obtain a water reward (~5 µl). To increase task engagement, mice were placed on a water control paradigm (1 ml/day) and weighed daily to ensure body weight remained above 85% of baseline. Mice were trained once per day for 30 mins and advanced through different phases of the task once they achieved at least 50 rewards in each of two consecutive sessions. Initially, mice were required to perform uncued abduction and adduction movements to obtain rewards, prior to the introduction of an auditory cue with pseudo-random inter-trial-interval (ITI) of 6-8s and a response window of 10 s window. The response window was gradually reduced to 2 s across training sessions.

Forelimb kinematic tracking
A motion index was calculated from high speed videos (60fps, Prosilica GC780C, Allied Vision, Germany or 300 fps for in vivo pharmacology, Mako U U-029, Allied Vision) of mouse behaviour acquired using Streampix 7 (Norpix, Canada). A rectangular region of interest (ROI) was drawn around the left forelimb and the frame-to-frame difference in pixel intensity was calculated using the formula: #$ % = ∑ )*+ , -. %/+,) − . %,) 2 2 , where cf,i is the grayscale level of pixel i in the frame f. Motion index was aligned to behaviourally-relevant time points (lever displacement, cue presentation etc), with videos and behaviour resampled to a common sampling rate. Motion index onsets were calculated by aligning the smoothed traces (40-point loess filter) to the lever movement and identifying the last point prior to movement where mean motion index was > threshold (mean upper bound of 95% confidence interval during baseline).

In vivo pharmacology
Mice trained to expert level had a small burr hole opened directly above caudal forelimb area (CFA; 1.6 mm lateral, 0.6 mm rostral to bregma) before recovering for > 90 mins. After 10 min of behaviour, the lever was locked and a small volume of the GABAA receptor agonist muscimol

Retrograde tracing
To selectively label pyramidal tract (PT-type) neurons in layer 5B of CFA, red RetroBeads were performed to reduce the contribution of background autofluorescence. Each ROI was then divided into 25-µm-deep bins that were normalised to a value between 0 and 1, with 0 being the darkest bin and 1 being the brightest bin and all bins were compared to baseline. In order to obtain a depth profile of layer 5B within CFA, the depth of the dorsal-most retrogradely labelled neuron was recorded at 100 µm intervals from 1.3 -1.9 mm lateral of bregma and repeated in 5 sequential coronal sections from 0.36 -0.84 mm rostral of bregma. For each mouse, the depth of layer 5B at the centre of CFA (1.6 mm lateral, 0.6 mm rostral to bregma) was taken as the reference depth and the depths of other locations reported relative to this value.

2-photon imaging
To perform population calcium imaging in layer 5B of CFA,, 200 nl of AAV1-SynGCaMP6s MHz repetition rate) tuned to 920 nm wavelength. Images were acquired at 40 Hz with a 40x objective lens (0.8 NA; Nikon) with custom-programmed LabVIEW-based software (LotoScan). Motion artefacts in the raw fluorescence videos were corrected using discrete Fourier 2-dimensional-based image alignment (SIMA 1.3.2; (Kaifosh et al., 2014)). ROIs were drawn manually in Fiji and pixel intensity within each ROI averaged to produce a raw fluorescence time series (F). To remove fluorescence originating from neuropil and / or neighbouring neurons, fluorescence signals were decontaminated and extracted using nonnegative matrix factorisation, as implemented in FISSA (Keemink et al., 2018). Normalized fluorescence was calculated as ∆F/F0, where F0 was calculated as the 5th percentile of the 1Hz low-pass filtered raw fluorescence signal and ∆F = F-F0. All further analyses were performed in custom written scripts in MATLAB or Python v 3.7, freely available via the Duguid Lab GitHub repository (https://github.com/DuguidLab). In order to define movement-related neurons, we first defined a baseline (-1.5 to -0.5 s relative to motion index onset) and perimovement (-0.15 s from motion index onset to +1.5 s after lever movement) epochs. Movement-related neurons were identified by two independent methods: 1) bootstrapped distribution (10,000 samples) of baseline-to-peak values (mean of the 100ms centred on the largest deviation from baseline within the peri-movement epoch -mean of baseline epoch) were compared with the baseline -traces were smoothed with a 40 frame loess filter; 2) bootstrapped distributions of ∆F/F0 in 250 ms bins within the peri-movement epoch were compared with baseline. If either method identified significant differences the neuron was classified as movement-related. ∆F/F0 onsets were calculated using a previously published onset detection algorithm using a slope sum function (SSF; (Zong et al., 2003)) with the decision rule and window of the SSF adapted to calcium imaging data (threshold 10% of peak, SSF window 375 ms, smoothed with a Savitzky Golay filter across 27 frames with order 2) and reported as the median of 10,000 bootstrapped samples to reduce the influence of noisy individual trials. Neurons with onsets beyond the peri-movement window were defined as 'reward phase' neurons. Neurons with action bias were detected using the same classification criteria described above but across actions (i.e. significant differences in bootstrapped ∆F/F0 baseline-to-peak or 250ms peri-movement bins).

Neural decoding
To decode action-type in single neurons we employed a Naïve Bayes classifier, where distributions of features are assumed to be Gaussian. Motion index-aligned ∆F/F0 data were assessed within a 10 s peri-movement window to produce a time series for the decoding accuracy. At each time point, leaving one trial out (test trial), the likelihood of determining abduction or adduction was based on the remaining trials (training set). For cross-validation, the leave-one-out procedure was then repeated by looping over trials. The resulting decoding accuracy time series were analysed within a peri-movement epoch -the peri-movement epoch began at -0.15 s relative to motion index onset and ended based on the peak ∆F/F0 response of each neuron; the position of the median peak was calculated for each action type and the later of these time points used as the cut off. To identify neurons with decoding performance above chance, the bootstrapped distributions of decoding accuracy scores were compared against a threshold value for each session. Only neurons with at least 1 bin significantly higher than threshold were defined as high decoding accuracy. The threshold for each session was calculated based on modelled data composed of random samples from a Gaussian distribution with the same number of trials as the experimental data. For each session, modelled data accuracy was calculated 1000 times, assuming a prior probability of 50:50, and the mean ± 2 SD was used as the threshold for significance. For population level classification of action type, we employed logistic regression. As above, the decoding accuracy of time series for each population was generated via leave-one-out design looped over all the trials in a given session. Population decoding accuracy was defined as the maximum decoding accuracy in any 250 ms bin within the peri-movement epoch. Population decoding was also performed on subsets of the entire population. Neurons were removed from the population one at a time, either in order from highest to lowest decoding accuracy score or randomly. The process was repeated 25 times in the random condition and the median of all responses used as the representative example for comparison with the ordered removal condition.
Subpopulations of neurons decoding significantly above chance were determined by comparing decoding scores with a shuffled dataset (sampled randomly from 1000 time points with the trial labels (abduction or adduction) randomised for each sample). If confidence intervals from the population data did not overlap with those of the shuffled data, population scores were deemed to be above chance. In 3/12 FOVs with low proportions of high decoding neurons and trial numbers, the population decoding accuracy was never significantly above chance. These FOVs were excluded from the comparison between ordered and random removal of neurons.

Dimensionality reduction
Raw fluorescence traces for all trials with successful movements in a 7.5 s peri-movement window were concatenated, filtered with a three frame (120 ms PCs showed significant separability (these two FOVs also had a chance level population decoding score), and were excluded in the summary data.

Spatiotemporal organisation
To assess the functional (temporal) organisation of simultaneously recorded populations of neurons, pairwise correlation coefficients (Pearson's r) from the motion index-aligned ∆F/F0 within the peri-movement epoch were compared -traces were smoothed with a 40 point loess filter. Data were split based on their decoding accuracy scores and the bootstrapped median difference between high decoding accuracy neurons and those of the population were subtracted and a median difference calculated per sample. This process was repeated 10,000 times to generate a distribution for high decoding neurons versus the entire population and the same sampling procedure was used to investigate the correlations within low decoding accuracy neurons. To investigate spatial clustering, bootstrapped median differences between high decoding accuracy neurons and the population using pairwise distances (defined as the Euclidean distance between the centroids of manually drawn ROIs from 2-photon imaging processing) were compared. A Generalised Linear Mixed-Effects Model: 4 ~ 6789:;.< =>)?@)AB × :..D4:.E FBGHFB? + :.97J; KL=B + :;7M:N was used to model the pairwise correlation coefficient as a function of pairwise distance (continuous), decoding accuracy and action type. Pairwise distance and decoding accuracy were modelled as interacting fixed terms, while action type and animal were modelled as random intercepts to account for the dependency of the measurements on observations from the same animal and across the different action types. The model was estimated using the restricted maximum likelihood, or REML, method (Bartlett and Fowler, 1937). Model assumptions were verified by comparing residual versus fitted values for each covariate in the model against each covariate removed from the model.

Statistics
Data analysis was performed using custom-written scripts in MATLAB 2019a or Python v3.7.
Data are reported as mean ± 95% bootstrapped confidence interval (10,000 bootstrap samples) unless otherwise indicated. Where multiple measurements were made from a single animal, suitable weights were used to evaluate summary population statistics. Statistical significance was considered when P<0.05 unless otherwise stated. Data were tested for normality and parametric/non-parametric tests were used as appropriate and as detailed in the text. The GLMM was designed in Python using the statsmodels library (Seabold and Perktold, 2010).