Data availability
The data in this study have been publicly deposited in Dryad at https://doi.org/10.5061/dryad.9p8cz8x0p (ref. 59). Source data are provided with this paper.
Code availability
Code is publicly available via Zenodo at https://doi.org/10.5281/zenodo.21341571 (ref. 60).
References
Bernardi, S. et al. The geometry of abstraction in the hippocampus and prefrontal cortex. Cell 183, 954–967 (2020).
Article CAS PubMed PubMed Central Google Scholar
Gallego, J. A., Perich, M. G., Miller, L. E. & Solla, S. A. Neural manifolds for the control of movement. Neuron 94, 978–984 (2017).
Article CAS PubMed PubMed Central Google Scholar
Sadtler, P. T. et al. Neural constraints on learning. Nature 512, 423–426 (2014).
Article ADS CAS PubMed PubMed Central Google Scholar
Cover, T. M. Geometrical and statistical properties of systems of linear inequalities with applications in pattern recognition. IEEE Trans. Electron. Comput. EC-14, 326–334 (1965).
Article Google Scholar
Litwin-Kumar, A., Harris, K. D., Axel, R., Sompolinsky, H. & Abbott, L. F. Optimal degrees of synaptic connectivity. Neuron 93, 1153–1164 (2017).
Article CAS PubMed PubMed Central Google Scholar
Marr, D. A theory of cerebellar cortex. J. Physiol. 202, 437–470 (1969).
Article CAS PubMed PubMed Central Google Scholar
Albus, J. S. A theory of cerebellar function. Math. Biosci. 10, 25–61 (1971).
Article Google Scholar
Cayco-Gajic, N. A., Clopath, C. & Silver, R. A. Sparse synaptic connectivity is required for decorrelation and pattern separation in feedforward networks. Nat. Commun. 8, 1116 (2017).
Article ADS PubMed PubMed Central Google Scholar
Ramnani, N. The primate cortico-cerebellar system: anatomy and function. Nat. Rev. Neurosci. 7, 511–522 (2006).
Article CAS PubMed Google Scholar
Saxena, S., Russo, A. A., Cunningham, J. & Churchland, M. M. Motor cortex activity across movement speeds is predicted by network-level strategies for generating muscle activity. eLife 11, e67620 (2022).
Article CAS PubMed PubMed Central Google Scholar
Braun, D. A., Aertsen, A., Wolpert, D. M. & Mehring, C. Motor task variation induces structural learning. Curr. Biol. 19, 352–357 (2009).
Article CAS PubMed PubMed Central Google Scholar
Li, N., Daie, K., Svoboda, K. & Druckmann, S. Robust neuronal dynamics in premotor cortex during motor planning. Nature 532, 459–464 (2016).
Article ADS CAS PubMed PubMed Central Google Scholar
Kim, J.-H., Daie, K. & Li, N. A combinatorial neural code for long-term motor memory. Nature 637, 663–672 https://doi.org/10.1038/s41586-024-08193-3 (2025).
Article ADS CAS PubMed Google Scholar
Chang, J. C., Perich, M. G., Miller, L. E., Gallego, J. A. & Clopath, C. De novo motor learning creates structure in neural activity that shapes adaptation. Nat. Commun. 15, 4084 (2024).
Article ADS CAS PubMed PubMed Central Google Scholar
Driscoll, L. N., Shenoy, K. & Sussillo, D. Flexible multitask computation in recurrent networks utilizes shared dynamical motifs. Nat. Neurosci. 27, 1349–1363 (2024).
Article PubMed PubMed Central Google Scholar
Yang, G. R., Joglekar, M. R., Song, H. F., Newsome, W. T. & Wang, X. J. Task representations in neural networks trained to perform many cognitive tasks. Nat. Neurosci. 22, 297–306 (2019).
Article CAS PubMed PubMed Central Google Scholar
Musslick, S. et al. Multitasking capability versus learning efficiency in neural network architectures. In Proc. Annual Meeting of the Cognitive Science Society Vol. 39, 829–834 (2017).
Sing, G. C. & Smith, M. A. Reduction in learning rates associated with anterograde interference results from interactions between different timescales in motor adaptation. PLoS Comput. Biol. 6, e1000893 (2010).
Article ADS PubMed PubMed Central Google Scholar
Stettler, D. D. & Axel, R. Representations of odor in the piriform cortex. Neuron 63, 854–864 (2009).
Article CAS PubMed Google Scholar
DiCarlo, J. J. & Cox, D. D. Untangling invariant object recognition. Trends Cogn. Sci. 11, 333–341 (2007).
Article PubMed Google Scholar
Leutgeb, J. K., Leutgeb, S., Moser, M. B. & Moser, E. I. Pattern separation in the dentate gyrus and CA3 of the hippocampus. Science 315, 961–966 (2007).
Article ADS CAS PubMed Google Scholar
Herculano-Houzel, S. Coordinated scaling of cortical and cerebellar numbers of neurons. Front. Neuroanat. 4, 12 (2010).
PubMed PubMed Central Google Scholar
Lanore, F., Cayco-Gajic, N. A., Gurnani, H., Coyle, D. & Silver, R. A. Cerebellar granule cell axons support high-dimensional representations. Nat. Neurosci. 24, 1142–1150 (2021).
Article CAS PubMed PubMed Central Google Scholar
Russo, A. A. et al. Motor cortex embeds muscle-like commands in an untangled population response. Neuron 97, 953–966 (2018).
Article CAS PubMed PubMed Central Google Scholar
Xie, M., Muscinelli, S. P., Decker Harris, K. & Litwin-Kumar, A. Task-dependent optimal representations for cerebellar learning. eLife 12, e82914 (2023).
Article CAS PubMed PubMed Central Google Scholar
Pemberton, J., Chadderton, P. & Costa, R. P. Cerebellar-driven cortical dynamics can enable task acquisition, switching and consolidation. Nat. Commun. 15, 10913 (2024).
Article ADS CAS PubMed PubMed Central Google Scholar
Pisano, T. J. et al. Homologous organization of cerebellar pathways to sensory, motor, and associative forebrain. Cell Rep. 36, 109721 (2021).
Article CAS PubMed PubMed Central Google Scholar
Wagner, M. J. et al. Shared cortex–cerebellum dynamics in the execution and learning of a motor task. Cell 177, 669–682 (2019).
Article CAS PubMed PubMed Central Google Scholar
Dana, H. et al. Sensitive red protein calcium indicators for imaging neural activity. eLife 5, e12727 (2016).
Article PubMed PubMed Central Google Scholar
Malone, T. J. et al. A consistent map in the medial entorhinal cortex supports spatial memory. Nat. Commun. 15, 1457 (2024).
Article ADS CAS PubMed PubMed Central Google Scholar
Garcia-Garcia, M. G. et al. A cerebellar granule cell-climbing fiber computation to learn to track long time intervals. Neuron 112, 2749–2764 (2024).
Article CAS PubMed PubMed Central Google Scholar
Babadi, B. & Sompolinsky, H. Sparseness and expansion in sensory representations. Neuron 83, 1213–1226 (2014).
Article CAS PubMed Google Scholar
Gao, P. et al. A theory of multineuronal dimensionality, dynamics and measurement. Preprint at bioRxiv https://doi.org/10.1101/214262 (2017).
Bronstein, M. M., Bruna, J., Cohen, T. & Veličković, P. Geometric deep learning: grids, groups, graphs, geodesics and gauges. Preprint at arXiv https://doi.org/10.48550/arXiv.2104.13478 (2021).
Aggarwal, C. C., Hinneburg, A. & Keim, D.A. On the surprising behavior of distance metrics in high dimensional space. In Database Theory: ICDT 2001 (Lecture Notes in Computer Science Vol. 1973) 420–434 (Springer, 2001).
Chen, T. W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).
Article ADS CAS PubMed PubMed Central Google Scholar
Giovannucci, A. et al. Cerebellar granule cells acquire a widespread predictive feedback signal during motor learning. Nat. Neurosci. 20, 727–734 (2017).
Article CAS PubMed PubMed Central Google Scholar
Knogler, L. D., Markov, D. A., Dragomir, E. I., Stih, V. & Portugues, R. Sensorimotor representations in cerebellar granule cells in larval zebrafish are dense, spatially organized, and non-temporally patterned. Curr. Biol. 27, 1288–1302 (2017).
Article CAS PubMed Google Scholar
Rigotti, M. et al. The importance of mixed selectivity in complex cognitive tasks. Nature 497, 585–590 (2013).
Article ADS CAS PubMed PubMed Central Google Scholar
Elsayed, G. F., Lara, A. H., Kaufman, M. T., Churchland, M. M. & Cunningham, J. P. Reorganization between preparatory and movement population responses in motor cortex. Nat. Commun. 7, 13239 (2016).
Article ADS CAS PubMed PubMed Central Google Scholar
Kriegeskorte, N., Mur, M. & Bandettini, P. A. Representational similarity analysis—connecting the branches of systems neuroscience. Front. Syst. Neurosci. 2, 4 (2008).
PubMed PubMed Central Google Scholar
Shepard, R. N. & Chipman, S. Second-order isomorphism of internal representations: shapes of states. Cogn. Psychol. 1, 1–17 (1970).
Article Google Scholar
Medina, J. F., Carey, M. R. & Lisberger, S. G. The representation of time for motor learning. Neuron 45, 157–167 (2005).
Article CAS PubMed Google Scholar
Narain, D., Remington, E. D., Zeeuw, C. I. D. & Jazayeri, M. A cerebellar mechanism for learning prior distributions of time intervals. Nat. Commun. 9, 469 (2018).
Article ADS PubMed PubMed Central Google Scholar
Wakhloo, A. J., Slatton, W. & Chung, S. Neural population geometry and optimal coding of tasks with shared latent structure. Nat. Neurosci. 29, 682–692 https://doi.org/10.1038/s41593-025-02183-y (2026).
Article CAS PubMed PubMed Central Google Scholar
Walter, J. T. & Khodakhah, K. The linear computational algorithm of cerebellar Purkinje cells. J. Neurosci. 26, 12861–12872 (2006).
Article CAS PubMed PubMed Central Google Scholar
Tenenbaum, J. B., Silva, V. D. & Langford, J. C. A global geometric framework for nonlinear dimensionality reduction. Science 290, 2319–2323 (2000).
Article ADS CAS PubMed Google Scholar
Flesch, T., Juechems, K., Dumbalska, T., Saxe, A. & Summerfield, C. Orthogonal representations for robust context-dependent task performance in brains and neural networks. Neuron 110, 1258–1270 (2022).
Article CAS PubMed PubMed Central Google Scholar
Ostrow, M., Eisen, A., Kozachkov, L. & Fiete, I. Beyond geometry: comparing the temporal structure of computation in neural circuits with dynamical similarity analysis. In Advances in Neural Information Processing Systems 36 (NeurIPS 2023) 33824–33837 (2023).
Nguyen, T. M. et al. Structured cerebellar connectivity supports resilient pattern separation. Nature 613, 543–549 (2023).
Article ADS CAS PubMed Google Scholar
Ten Brinke, M. M. et al. Evolving models of pavlovian conditioning: cerebellar cortical dynamics in awake behaving mice. Cell Rep. 13, 1977–1988 (2015).
Article PubMed PubMed Central Google Scholar
Vershynin, R. High-Dimensional Probability: An Introduction with Applications in Data Science (Cambridge Univ. Press, 2018).
Mastrogiuseppe, F. & Ostojic, S. Linking connectivity, dynamics, and computations in low-rank recurrent neural networks. Neuron 99, 609–623 (2018).
Article CAS PubMed Google Scholar
Sussillo, D. & Abbott, L. F. Generating coherent patterns of activity from chaotic neural networks. Neuron 63, 544–557 (2009).
Article CAS PubMed PubMed Central Google Scholar
Wójcik, M. J. et al. Learning shapes neural geometry in the primate prefrontal cortex. Nat. Neurosci. https://doi.org/10.1038/s41593-026-02333-w (2026).
Article PubMed PubMed Central Google Scholar
Shadmehr, R. & Brashers-Krug, T. Functional stages in the formation of human long-term motor memory. J. Neurosci. 17, 409–419 (1997).
Article CAS PubMed PubMed Central Google Scholar
Kawai, R. et al. Motor cortex is required for learning but not for executing a motor skill. Neuron 86, 800–812 (2015).
Article CAS PubMed PubMed Central Google Scholar
Ekelmans, P., Kraynyukova, N. & Tchumatchenko, T. Targeting operational regimes of interest in recurrent neural networks. PLoS Comput. Biol. 19, e1011097 (2023).
Article ADS CAS PubMed PubMed Central Google Scholar
Garcia-Garcia, M. et al. Data from: Granule cells reorient cortical trajectories to separate contexts. Dryad https://doi.org/10.5061/dryad.9p8cz8x0p (2026).
Garcia-Garcia, M. et al. Code for: Granule cells reorient cortical trajectories to separate contexts. Zenodo https://doi.org/10.5281/zenodo.21341571 (2026).
Download references
Acknowledgements
We thank the National Institute of Mental Health Section on Instrumentation for fabrication; the National Eye Institute Ocular Gene Therapy Core for viral packaging; the staff at the National Eye Institute Building 49 Central Animal Facility for animal care and husbandry; Y. Gu, C. McBain and members of their laboratory for designs for the VR navigation apparatus; and L. Luo and members of the Neocortex-cerebellum Circuitry Unit for helpful comments on the manuscript.
Funding
This research was supported by the Intramural Research Program of the NIH NINDS (ZIA NS009434 to M. J. Wagner). M.G.G.-G. was supported by an NIH NINDS Competitive Fellowship Award. The contributions of the NIH authors were made as part of their official duties as NIH federal employees, are in compliance with agency policy requirements and are considered works of the United States Government. However, the findings and conclusions presented in this paper are those of the authors and do not necessarily reflect the views of the NIH or the US Department of Health and Human Services.
Ethics declarations
Competing interests
The authors declare no competing interests.
Peer review
Peer review information
Nature thanks Joern Diedrichsen and the other, anonymous, reviewer(s) for their contribution to the peer review of this work. Peer reviewer reports are available.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Extended data figures and tables
Extended Data Fig. 1 Dual-task cortico-cerebellar two-photon imaging.
a, Histological image of jRGECO1a expression in pons-projecting premotor cortical neurons, which are enriched in the deeper part of layer V around 700 µm below the surface of the brain. RFA, rostral forelimb area of the premotor cortex. b, For the example VR–reach matched imaging session pair in Fig. 1, mean two-photon images show spatial filters for all L5PTs and GrCs with detected activity in both tasks (138 L5PT and 368 GrCs). Traces show 50 example neurons from each imaging session and cell type with colours corresponding to the cell maps above. c, Cross-day cell tracking retention rates. For each session pair, dots indicate the fraction of cells in session 1 that also had detected activity in session 2. While overall retention was lower for GrCs than L5PT due to optical constraints, there was no significant difference between cross-task and same-task retention rates within either cell type (L5PT: p = 0.5; GrCs: p = 1, two-sided Mann–Whitney U-test), demonstrating that tracking attrition was not driven by context-switching (18 cross-task and 9 same-task session pairs from 9 mice). d, Bars show fractions of cells in each cross-task session pair that were reliable across both tasks, which did not differ by cell type (p = 0.3, Wilcoxon signed-rank test; 18 cross-task session pairs). e,f, Custom dual-site microscope mechanics enabling cross-day registration. To accommodate the challenges of tracking dual-region brain activity while alternating between two distinct behavioural apparatuses, we redesigned a dual-site two-photon microscope28 to equip both the cortex arm and the mouse platform with joystick-controlled motorized 3D translation. e, Isolated view of the redesigned cortex arm. Two high-load, long-travel (75 mm), high-accuracy Zaber stages provided motorized x and z control (X-LRQ075HP-DE51). A third compact motorized Zaber stage provided 25 mm of y travel (LSA25A). f, Overall view of both the motorized cortex arm and the cerebellum arm with 16×0.8 NA Nikon and 40×0.8 NA Olympus objectives positioned over the imaging sites on a model mouse skull. Below, a motorized 3D translation platform with 150 mm x/y travel (Zaber X-LRQ150AP-DE51C) and 40 mm z travel (Zaber X-VSR40A) allowed positioning the cerebellum under the cerebellar imaging objective for both behavioural apparatuses. Registration followed a four-step sequence: (1) Align the cerebellar objective optical axis to the window using the cerebellar arm pitch/yaw rotational axes. (2) Position the cerebellar imaging site using the motorized translation platform; fine-tune depth via objective z-piezo; (3) Align the cortical objective optical axis using the left arm pitch/yaw rotational axes; (4) Position the cortex imaging site using the motorized cortex arm; fine-tune depth via objective z-piezo. g, Single-trial behavioural data from a representative matched reach–VR session pair. Traces (top) show single position trajectories and Rasters (bottom) show binary lick sensor contacts with trials grouped into rewarded and omitted reward blocks for ease of visualization. h, Brain motion. Dots show sessions, quantified as standard deviation across all frames of the lateral motion correction computed by the image registration algorithm. Brain motion did not differ between tasks, but was slightly higher for L5PT, probably because the primary skull fixation plate encased the cerebellar window while the cortical window was stabilized by a smaller auxiliary plate (GrCs: p = 0.08; L5PT: p = 0.3, two-sided Wilcoxon signed-rank test; 18 cross-task session pairs).
Source data
Extended Data Fig. 2 GrC activity is necessary for the expression of anticipatory licking in both tasks.
a, Schematic of the optogenetic paradigm for inhibiting GrCs during the delay period on interleaved perturbation trials (4 sessions from 4 mice). 70% of trials were rewarded laser-off; 10% each were: rewarded laser-on; omission laser-off; and omission laser-on. Posterior cerebellum was illuminated through a cranial window with a 594 nm laser in Gabra6-Cre×stGtACR1 mice, which express the soma-targeted inhibitory opsin GtACR1 in all GrCs. b,c, Licking behaviour in the VR task (b) and reach task (c) during control trials and randomly interleaved GrC inhibition trials (20%). Rasters (top) show binary lick contacts for rewarded laser-off and rewarded laser-on conditions (all 35 (VR) or 34 (reach) laser-on rewarded trials and a randomly selected subset of laser-off rewarded trials drawn from 243 (VR) or 263 (reach) trials from 4 sessions per task from 4 mice). Traces (bottom) show smoothed lick rates for all four conditions (normalized identically to the main dataset, using the rewarded laser-off data; VR/reach trials: 243/263 rewarded laser-off, 35/34 rewarded laser-on, 39/48 omission laser-off, 34/43 omission laser-on). Shaded regions show s.e.m. across trials. d, Violins quantify anticipatory licking (mean [−0.7,−0.2] s relative to reward; normalized as above) during all 4 conditions. GrC inhibition trials abolished anticipatory licking (laser off vs on: VR rewarded, VR omission, reach rewarded all p < 10−6; reach omission p = 0.00001; two-sided Mann–Whitney U-test; Methods).
Extended Data Fig. 3 Comparison of GrC and L5PT dynamics.
a, Effective dimensionality (participation ratio [PR]) computed on single-trial data for each task. For each session, we concatenated all rewarded trials into a time × cells matrix and computed PCA and PRs, which were significantly lower for GrCs than for L5PT (both p = 0.0003, two-sided Wilcoxon signed-rank test), thus as in Fig. 2l,m qualitatively inconsistent with a traditional high-rank GrC expansion (18 matched VR and reach session pairs from 9 mice). b–d, Goodness of fit for joint-task PCA data shown in Fig. 3. b, Variance explained by the top 2 joint-task PCs as a percentage of the variance explained by the top 2 task-space PCs. This metric controls for the possibility that the low cross-task correlations in GrCs (Fig. 3u) were simply an artefact of poor joint-subspace fitting. However, joint PCs captured the vast majority of variance captured by per-task PCA for both populations (L5PT around 85%, GrCs around 80%), and this ratio was indistinguishable between tasks for both cell types (L5PT: p = 0.4; GrCs: p = 0.1, two-sided Wilcoxon signed-rank test). c,d, Joint PC quality variation between tasks. Variance explained (c) and coherence (d) for the top 2 joint-task PCs from all sessions. To explicitly test if GrCs suffered from a harsher cross-task compromise than L5PT, we calculated the absolute difference between the reach and VR metrics (distance from the unity line, insets). Both L5PT and GrCs showed comparable deviation from unity (insets; Variance: p = 0.6; Coherence: p = 0.1, two-sided Wilcoxon signed-rank test). By contrast, cross-task correlations (colour scale) were profoundly lower for GrCs—demonstrating that GrC decorrelation cannot be attributed to lower joint PC quality or asymmetric subspace fitting. Coherence is quantified as the ratio of PC variance to the variance of a random projection (18 matched VR and reach session pairs from 9 mice).
Source data
Extended Data Fig. 4 Further examples of GrC trajectory reorientations.
a–l, Low-dimensional trajectory analysis for two additional mice (mouse 3 and mouse 4), distinct from those shown in Fig. 4. a–f, Example mouse 3: A session characterized by strong GrC rotational separation. a–d, Independent projections in reach (a,c) and VR (b,d) show smooth cyclic motifs for both L5PTs (a,b) and GrCs (c,d). e, In the joint-task shared space, L5PT trajectories remain aligned (trajectory reuse, rotation of around 19°). f, GrC trajectories, however, undergo a large relative in-plane rotation (rotation of around 73°), orthogonalizing the contexts while maintaining the cyclic structure. g–l, Example mouse 4: A session exhibiting concurrent GrC in-plane rotation and out-of-plane separation. Panels show independent reach (g,i) and VR (h,j) projections for both L5PTs (g,h) and GrCs (i,j). k, L5PT trajectories remain aligned in shared space (rotation of around 17°). l, GrC trajectories show a complex transformation: the reach trajectory (red) is both strongly rotated (rotation of around 124°) relative to VR but also significantly elongated (around 92%), appearing effectively collapsed along PC2. This illustrates that context separation in GrC trajectories often manifests as both in-plane and out-of-plane reorientations. For visualization only, means and single trials were Gaussian-smoothed with σ = 0.1 and 0.2 s respectively. m–p, Scree plots of the joint-task variance explained by each shared-space PC for examples 1 (m), 2 (n), 3 (o) and 4 (p). q, Cross-context GrC trajectory decorrelation versus L5PT–GrC similarity (dots denote session pairs, ρ values from Fig. 4q). Even when GrCs strongly decorrelated contexts, L5–GrC representational similarity usually remained high (Spearman’s ρ = –0.21, p = 0.4, two-sided Spearman rank correlation. 18 matched VR and reach session pairs from 9 mice).
Source data
Extended Data Fig. 5 Further characterization of learning.
a, Cohort-averaged novice behaviour (analogous to Fig. 1) in reach (left column) and VR (right column). Novice data are derived from consecutive VR/reach training days, e.g., reach on day n and VR on day n + 1 acquired after pre-training. Top: position trajectories (reach robotic handle position or VR running sphere position both in mm). Bottom: lick rates on rewarded and omitted reward trials, showing primarily reactive licking strategies. Traces represent the average of trial averages from 9 paired novice reach–VR sessions from 9 mice. Shaded regions show s.e.m. across sessions. b–g, A second representative example mouse showing learning-related changes from a novice session pair (b–d) to a trained session pair (e–g). b,e, Licking behaviour. Joint-task PC1 activity is shown for L5PT (c,f) and GrCs (d,g; analogous to Fig. 5a–f; novice: 51 reach/76 VR trials; trained: 91 reach/43 VR trials). Shaded regions show s.e.m. across trials. h, Comparison of predictive licking performance in each task independently (quantified per task as in Fig. 5). Brackets highlight 3 sessions with predictive licking in VR but not in reach, and conversely 4 sessions with significant predictive licking in reach but not in VR, demonstrating that during intermediate learning stages, animals sometimes acquire predictive behaviour in only one task, rather than consistently learning both tasks in lockstep (26 session pairs; 17 trained, 9 novice).
Source data
Extended Data Fig. 6 Characterization of simulated architectures and the geometric trade-off between learning speed and interference.
a–c, State-space geometry of the simulated dynamic prediction tasks, illustrating input manifolds (grey) and temporally shifted target predictions (coloured) for task 1 (40° rotation, a), task 2 (130° rotation, b), and both tasks combined (c). Noiseless inputs are shown for visualization purposes; all simulations used noisy inputs. d, The alternating training schedule, comprising 100-epoch phases. e–g, PC projections of GrC representations during alternating tasks. e, The cortical relay model preserves overlapping geometry. f, The high-rank expansion model reveals a spectrally whitened high-dimensional geometry (axes scaled independently to each model to visualize structure despite sparsity-induced variance reduction). g, The low-rank rotation model geometrically separates the trajectories while preserving smooth low-dimensional geometry. h, Active GrC population overlap measured by Jaccard similarity. Due to dense coding, both relay and rotation models recruit largely overlapping populations. In contrast, the expansion model sparsifies the representation, resulting in near-zero overlap. This confirms the rotation model mitigates interference through geometric alignment rather than physical population partitioning (dots show 20 random network initializations). i, Training loss over epochs for the three GrC architectures. Note the rapid convergence of the Relay and Rotation models relative to the expansion model. j, Previous task loss (task 2 loss when trained on task 1, and vice versa) over epochs. The relay model suffers from catastrophic interference immediately following task switches. The rotation model maintains lower error on the inactive task, comparable to the expansion model. k–o, Isolating the geometric effects of smoothness. k, To test whether the loss of smoothness—beyond the effects of sparsity—drives the learning-interference trade-off, structurally intact (left) or manually tangled (right) manifolds were fed into the dense relay architecture. l–o, Increasing the geometric tangling strength within the relay model progressively degraded training loss (l) and learning speed (n), while simultaneously reducing previous task loss (m,o). At maximum tangling, the dense relay model’s performance morphed to match the sparse expansion model baseline more closely (dashed grey lines). Dots in h,n,o depict 20 random network initializations.
Extended Data Fig. 7 Findings are robust to cell tracking and inclusion criteria.
a,b, Joint histograms of activity level (peak trial-averaged z-scored fluorescence) across tasks for all cross-task-matched L5PTs (a) and GrCs (b). Thresholding these populations to identify nearly task-specific neurons (>0.7 zsc in one task but <0.4 zsc in the other) identified only 8.1% of L5PTs and 7.7% of GrCs as putatively task-specific. This was consistently, but only slightly, higher than in cross-day same-task control comparisons (4.8% of L5PTs and 5.1% of GrCs). Thus, neurons successfully matched across tasks were overwhelmingly likely to be comparably active in both, with no difference between cell types. c–j, Robustness of representational findings to cell selection criteria. To ensure our central conclusions were not driven by the exclusion of task-unreliable neurons, we replicated key analyses using all tracked cells, regardless of their split-half reliability. The central representational results remained nearly identical to the filtered dataset. Specifically, in the unfiltered population comparing L5PT to GrCs: effective dimensionality (c) was 5.2 vs 6.2 in reach (p = 0.2) and 5.6 vs 4.5 in VR (p = 0.03; compared to 4.1/5.0 in reach and 4.3/4.1 in VR in Fig. 2m); single-cell correlations (d; cross-task: p = 0.002; same-task: p = 0.2) cross-task were r = 0.57 vs r = 0.23 (compared to 0.58/0.23 in Fig. 3o); shared-space PC1-2 correlations (e; cross-task: p = 0.001; same-task: p = 0.2) cross-task were r = 0.83 vs 0.23 (compared to 0.83/0.24 in Fig. 3u); trajectory rotation (f; cross-task: p = 0.002; same-task: p = 0.4) cross-task was 17° vs 46° (compared to 19°/54° in Fig. 4m); elongation (g; cross-task: p = 0.4; same-task: p = 0.5) cross-task was 30% vs 40% (compared to 26%/46% in Fig. 4n). Within-task L5PT–GrC RSA similarity (h; p = 0.0002) was ρ = 0.83 (identical to Fig. 4q). Excess GrC decorrelation correlated with predictive licking (i) at ρ = 0.56 (Spearman rank correlation, compared to 0.6 in Fig. 5i), and median decorrelation in predictive versus reactive sessions (j, p = 0.003) was 0.42 vs −0.03 (compared to 0.44/−0.004 in Fig. 5j). With the exception of the elongation score—where the large population of task-unreliable cells elevated the isotropic variance floor, obscuring the geometric signal—the representational and geometric findings were robust to cell selection criteria. All quantifications are from 18 cross-task (9 mice) and 9 same-task (7 mice) session pairs. All paired and unpaired comparisons used two-sided Wilcoxon signed-rank or two-sided Mann–Whitney U-tests.
Source data
Supplementary information
Source data
Rights and permissions
About this article
Cite this article
Garcia-Garcia, M.G., Wójcik, M.J., Thota, S. et al. Granule cells reorient cortical trajectories to separate contexts. Nature (2026). https://doi.org/10.1038/s41586-026-10946-1
Download citation
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41586-026-10946-1