Skip to main content

Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

  • Article
  • Published:

Cortical processing of flexible and context-dependent sensorimotor sequences

Abstract

The brain generates complex sequences of movements that can be flexibly configured based on behavioural context or real-time sensory feedback1, but how this occurs is not fully understood. Here we developed a ‘sequence licking’ task in which mice directed their tongue to a target that moved through a series of locations. Mice could rapidly branch the sequence online based on tactile feedback. Closed-loop optogenetics and electrophysiology revealed that the tongue and jaw regions of the primary somatosensory (S1TJ) and motor (M1TJ) cortices2 encoded and controlled tongue kinematics at the level of individual licks. By contrast, the tongue ‘premotor’ (anterolateral motor) cortex3,4,5,6,7,8,9,10 encoded latent variables including intended lick angle, sequence identity and progress towards the reward that marked successful sequence execution. Movement-nonspecific sequence branching signals occurred in the anterolateral motor cortex and M1TJ. Our results reveal a set of key cortical areas for flexible and context-informed sequence generation.

This is a preview of subscription content, access via your institution

Access options

Buy this article

Prices may be subject to local taxes which are calculated during checkout

Fig. 1: Sequence licking task.
Fig. 2: Optogenetic inhibition and single-unit activity survey across cortical regions during sequence execution.
Fig. 3: Neuronal populations code with increasing levels of abstraction across cortical areas.
Fig. 4: Context-dependent coding of subsequences in ALM.

Similar content being viewed by others

Data availability

Data are available from the corresponding author upon request.

Code availability

The MATLAB code used to analyse the data is available at GitHub and from the corresponding author upon request.

References

  1. Rosenbaum, D. A. Human Motor Control (Elsevier, 2010).

  2. Mayrhofer, J. M. et al. Distinct contributions of whisker sensory cortex and tongue-jaw motor cortex in a goal-directed sensorimotor transformation. Neuron 103, 1034–1043.e5 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  3. Chen, T.-W., Li, N., Daie, K. & Svoboda, K. A map of anticipatory activity in mouse motor cortex. Neuron 94, 866–879.e4 (2017).

    Article  CAS  PubMed  Google Scholar 

  4. Economo, M. N. et al. Distinct descending motor cortex pathways and their roles in movement. Nature 563, 79–84 (2018).

    Article  CAS  PubMed  ADS  Google Scholar 

  5. Gao, Z. et al. A cortico-cerebellar loop for motor planning. Nature 563, 113–116 (2018).

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  6. Guo, Z. V. et al. Flow of cortical activity underlying a tactile decision in mice. Neuron 81, 179–194 (2014).

    Article  CAS  PubMed  Google Scholar 

  7. Inagaki, H. K., Fontolan, L., Romani, S. & Svoboda, K. Discrete attractor dynamics underlies persistent activity in the frontal cortex. Nature 566, 212–217 (2019).

    Article  CAS  PubMed  ADS  Google Scholar 

  8. Li, N., Chen, T.-W., Guo, Z. V., Gerfen, C. R. & Svoboda, K. A motor cortex circuit for motor planning and movement. Nature 519, 51–56 (2015).

    Article  CAS  PubMed  ADS  Google Scholar 

  9. Li, N., Daie, K., Svoboda, K. & Druckmann, S. Robust neuronal dynamics in premotor cortex during motor planning. Nature 532, 459–464 (2016).

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  10. Komiyama, T. et al. Learning-related fine-scale specificity imaged in motor cortex circuits of behaving mice. Nature 464, 1182–1186 (2010).

    Article  CAS  PubMed  ADS  Google Scholar 

  11. Kurnikova, A., Moore, J. D., Liao, S.-M., Deschênes, M. & Kleinfeld, D. Coordination of orofacial motor actions into exploratory behavior by rat. Curr. Biol. 27, 688–696 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  12. McElvain, L. E. et al. Circuits in the rodent brainstem that control whisking in concert with other orofacial motor actions. Neuroscience 368, 152–170 (2018).

    Article  CAS  PubMed  Google Scholar 

  13. Welker, W. I. Analysis of sniffing of the albino rat 1). Behaviour 22, 223–244 (1964).

    Article  Google Scholar 

  14. Chartier, J., Anumanchipalli, G. K., Johnson, K. & Chang, E. F. Encoding of articulatory kinematic trajectories in human speech sensorimotor cortex. Neuron 98, 1042–1054.e4 (2018).

    Article  PubMed  PubMed Central  Google Scholar 

  15. Svoboda, K. & Li, N. Neural mechanisms of movement planning: motor cortex and beyond. Curr. Opin. Neurobiol. 49, 33–41 (2018).

    Article  CAS  PubMed  Google Scholar 

  16. Ayling, O. G. S., Harrison, T. C., Boyd, J. D., Goroshkov, A. & Murphy, T. H. Automated light-based mapping of motor cortex by photoactivation of channelrhodopsin-2 transgenic mice. Nat. Methods 6, 219–224 (2009).

    Article  CAS  PubMed  Google Scholar 

  17. Guo, J.-Z. et al. Cortex commands the performance of skilled movement. eLife 4, e10774 (2015).

    Article  PubMed  PubMed Central  Google Scholar 

  18. Clemens, A. M., Fernandez Delgado, Y., Mehlman, M. L., Mishra, P. & Brecht, M. Multisensory and motor representations in rat oral somatosensory cortex. Sci. Rep. 8, 13556 (2018).

    Article  PubMed  PubMed Central  ADS  Google Scholar 

  19. Proske, U. & Gandevia, S. C. The proprioceptive senses: their roles in signaling body shape, body position and movement, and muscle force. Physiol. Rev. 92, 1651–1697 (2012).

    Article  CAS  PubMed  Google Scholar 

  20. Franklin, D. W. & Wolpert, D. M. Computational mechanisms of sensorimotor control. Neuron 72, 425–442 (2011).

    Article  CAS  PubMed  Google Scholar 

  21. Shadmehr, R., Smith, M. A. & Krakauer, J. W. Error correction, sensory prediction, and adaptation in motor control. Annu. Rev. Neurosci. 33, 89–108 (2010).

    Article  CAS  PubMed  Google Scholar 

  22. Chesler, A. T. et al. The role of PIEZO2 in human mechanosensation. N. Engl. J. Med. 375, 1355–1364 (2016).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  23. Inagaki, H. K., Inagaki, M., Romani, S. & Svoboda, K. Low-dimensional and monotonic preparatory activity in mouse anterior lateral motor cortex. J. Neurosci. 38, 4163–4185 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  24. Stapleton, J. R. Rapid taste responses in the gustatory cortex during licking. J. Neurosci. 26, 4126–4138 (2006).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  25. Accolla, R., Bathellier, B., Petersen, C. C. H. & Carleton, A. Differential spatial representation of taste modalities in the rat gustatory cortex. J. Neurosci. 27, 1396–1404 (2007).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  26. Jin, X. & Costa, R. M. Start/stop signals emerge in nigrostriatal circuits during sequence learning. Nature 466, 457–462 (2010).

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  27. Kriegeskorte, N. & Douglas, P. K. Interpreting encoding and decoding models. Curr. Opin. Neurobiol. 55, 167–179 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  28. Russo, A. A. et al. Neural trajectories in the supplementary motor area and motor cortex exhibit distinct geometries, compatible with different classes of computation. Neuron 107, 745–758.e6 (2020).

    Article  CAS  PubMed  Google Scholar 

  29. Russo, A. A. et al. Motor cortex embeds muscle-like commands in an untangled population response. Neuron 97, 953–966.e8 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  30. Evarts, E. V. & Tanji, J. Reflex and intended responses in motor cortex pyramidal tract neurons of monkey. J. Neurophysiol. 39, 1069–1080 (1976).

    Article  CAS  PubMed  Google Scholar 

  31. Heindorf, M., Arber, S. & Keller, G. B. Mouse motor cortex coordinates the behavioral response to unpredicted sensory feedback. Neuron 99, 1040–1054.e5 (2018).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  32. Pruszynski, J. A. et al. Primary motor cortex underlies multi-joint integration for fast feedback control. Nature 478, 387–390 (2011).

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  33. Scott, S. H., Cluff, T., Lowrey, C. R. & Takei, T. Feedback control during voluntary motor actions. Curr. Opin. Neurobiol. 33, 85–94 (2015).

    Article  CAS  PubMed  Google Scholar 

  34. Stavisky, S. D., Kao, J. C., Ryu, S. I. & Shenoy, K. V. Motor cortical visuomotor feedback activity is initially isolated from downstream targets in output-null neural state space dimensions. Neuron 95, 195–208.e9 (2017).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  35. Bollu, T. et al. Cortex-dependent corrections as the tongue reaches for and misses targets. Nature 594, 82–87 (2021).

    Article  CAS  PubMed  ADS  Google Scholar 

  36. Tanji, J. Sequential organization of multiple movements: involvement of cortical motor areas. Annu. Rev. Neurosci. 24, 631–651 (2001).

    Article  CAS  PubMed  Google Scholar 

  37. Desrochers, T. M., Burk, D. C., Badre, D. & Sheinberg, D. L. The monitoring and control of task sequences in human and non-human primates. Front. Syst. Neurosci. 9, 185 (2016).

    Article  PubMed  PubMed Central  Google Scholar 

  38. Shima, K. & Tanji, J. Neuronal activity in the supplementary and presupplementary motor areas for temporal organization of multiple movements. J. Neurophysiol. 84, 2148–2160 (2000).

    Article  CAS  PubMed  Google Scholar 

  39. Tanji, J. & Shima, K. Role for supplementary motor area cells in planning several movements ahead. Nature 371, 413–416 (1994).

    Article  CAS  ADS  PubMed  Google Scholar 

  40. Sohn, J.-W. & Lee, D. Order-dependent modulation of directional signals in the supplementary and presupplementary motor areas. J. Neurosci. 27, 13655–13666 (2007).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  41. Chabrol, F. P., Blot, A. & Mrsic-Flogel, T. D. Cerebellar contribution to preparatory activity in motor neocortex. Neuron 103, 506–519.e4 (2019).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  42. Vong, L. et al. Leptin action on GABAergic neurons prevents obesity and reduces inhibitory tone to POMC neurons. Neuron 71, 142–154 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  43. Madisen, L. et al. A toolbox of Cre-dependent optogenetic transgenic mice for light-induced activation and silencing. Nat. Neurosci. 15, 793–802 (2012).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  44. Zhao, S. et al. Cell type-specific channelrhodopsin-2 transgenic mice for optogenetic dissection of neural circuitry function. Nat. Methods 8, 745–752 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  45. Savitt, J. M. Bcl-x is required for proper development of the mouse substantia nigra. J. Neurosci. 25, 6721–6728 (2005).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  46. Taniguchi, H. et al. A resource of Cre driver lines for genetic targeting of GABAergic neurons in cerebral cortex. Neuron 71, 995–1013 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  47. Zhou, X. et al. Deletion of PIK3C3/Vps34 in sensory neurons causes rapid neurodegeneration by disrupting the endosomal but not the autophagic pathway. Proc. Natl Acad. Sci. USA 107, 9424–9429 (2010).

    Article  CAS  PubMed  PubMed Central  ADS  Google Scholar 

  48. He, K., Zhang, X., Ren, S. & Sun, J. Deep residual learning for image recognition. Proc. IEEE Conf. Computer Vision and Pattern Recognition 770–778 (2016).

  49. Badrinarayanan, V., Kendall, A. & Cipolla, R. SegNet: a deep convolutional encoder-decoder architecture for image segmentation. IEEE Trans. Pattern Anal. Mach. Intell. 39, 2481–2495 (2017).

  50. Mowery, T. M., Kotak, V. C. & Sanes, D. H. Transient hearing loss within a critical period causes persistent changes to cellular properties in adult auditory cortex. Cereb. Cortex 25, 2083–2094 (2015).

    Article  PubMed  Google Scholar 

  51. Pachitariu, M., Steinmetz, N. A., Kadir, S. N., Carandini, M. & Harris, K. D. Fast and accurate spike sorting of high-channel count probes with KiloSort. Adv. Neural Inf. Process. Syst. https://papers.nips.cc/paper/2016/file/1145a30ff80745b56fb0cecf65305017-Paper.pdf (2016).

  52. Hill, D. N., Mehta, S. B. & Kleinfeld, D. Quality metrics to accompany spike sorting of extracellular signals. J. Neurosci. 31, 8699–8705 (2011).

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  53. Navratilova, Z., Godfrey, K. B. & McNaughton, B. L. Grids from bands, or bands from grids? An examination of the effects of single unit contamination on grid cell firing fields. J. Neurophysiol. 115, 992–1002 (2016).

    Article  CAS  PubMed  Google Scholar 

  54. Saravanan, V., Berman, G. J. & Sober, S. J. Application of the hierarchical bootstrap to multi-level data in neuroscience. Preprint at https://arxiv.org/abs/2007.07797 (2020).

  55. Williams, A. H. & Linderman, S. W. Statistical neuroscience in the single trial limit. Curr. Opin. Neurobiol. 70, 193–205 (2021).

  56. Zou, H. & Hastie, T. Regularization and variable selection via the elastic net. J. R. Stat. Soc. Ser. B Stat. Methodol. 67, 301–320 (2005).

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

We thank W. Olson, R. Dasgupta, Y.-T. Chang, V. Chokshi, J. Cohen, M. Economo and K. Svoboda for comments on the manuscript; A. Aly, Y. Hwang and H. Deng for assistance with experiments and data curation; V. Chokshi and W. Olson for sharing animals; B. Bari and J. Cohen for VGAT-Cre;Ai32 mice; and T. Babola for suggestions on the hearing loss experiment. This work was supported by NIH grants R01NS089652 and 1R01NS104834-01 to D.H.O., and NIH center grant P30NS050274.

Author information

Authors and Affiliations

Authors

Contributions

D.X., M.D., Y.C., A.M.D., N.C.H. and L.Z. performed the experiments. D.X. developed custom software, hardware, the analysis code and analysed the data, with input from all authors. D.X., M.D., N.C.H. and D.H.O. wrote the paper with input from all authors.

Corresponding author

Correspondence to Daniel H. O’Connor.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review information

Nature thanks the anonymous reviewers for their contribution to the peer review of this work.

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 Behavioral measurements, performance, and control experiments.

a, Confusion matrix showing the performance of the classification network. The numbers represent percentages within each (true) class (n = 1696 frames). b, Performance of the regression network. Top, the gray probability distribution shows how L from five human individuals varied from the mean L across the five. The red distribution shows how predicted L varied from the human mean. Bottom, similar quantification as the top but for θ. n = 573 frames. c, CAD images of the sensor core (left) and the assembly (right) with a lick tube. d, Linear relationship between the applied force and the sensor output voltage. e, Two example trials showing the trajectories of the tongue tip when a mouse sequentially reached the 7 port positions, for both sequence directions. Arrows indicate the direction of time within each trajectory. f, Patterns of kinematics and forces of single licks at each port position (n = 25683 trials from 17 mice; mean ± 95% bootstrap confidence interval). The duration of individual licks was normalized. g, Top, the pattern of angle deviation from midline (|θ|) of single licks pooled from R3 and L3. The vertical line indicates maximum |θ| (|θ|max). Middle, tongue length (L) expressed as a fraction of its maximum (Lmax). The horizontal line indicates, on average, the fraction where |θ|max occurred. Bottom, time aligned probability distributions showing when touch onset, |θ|max, Lmax, or θshoot occurred. Red lines mark quartiles. n = 25683 trials from 17 mice. Lick patterns show mean ± 95% bootstrap confidence interval. h, Top, probability distributions of Lmax and θtouch for licks at each port position. Bottom, probability distributions of the change in Θtouch (ΔΘtouch) and instantaneous sequence speed (Methods) for each interval separating port positions. Distributions show mean ± s.d. across n = 17 mice. i, Median time to first touch (top) and the average number of missed licks during sequence performance (bottom) in control (Sham) versus hearing loss (Earplug) conditions. Bars show group means and lines show data from individual mice. p < 0.001, n.s. p > 0.05, paired one-tailed bootstrap test, n = 5 mice. j, Average number of missed licks before first touch (top) and during sequence performance (bottom) in control (Normal) versus odor masking (Masked) conditions. Same statistical tests as in (i), n = 6 mice. k, Similar to (j) but comparing control (Saline) versus tongue numbing (Lidocaine) conditions. n = 5 mice. l, Learning curves for 15 individual mice (gray) and the mean (black) showing a reduction in sequence initiation time (left) in response to the auditory cue and an increase in sequence speed (right). The three red asterisks correspond to the three examples of sequence performance shown in (n). m, Gradual increase in task difficulty (Methods) accompanying the improved performance shown in (l). n, Depiction of example sequences performed by a mouse in alternating directions across consecutive trials at different stages of learning. Trial onsets are marked by yellow bars. Port positions shown in the black trace are overlaid with touch onsets (dots).

Extended Data Fig. 2 Performance in backtracking sequences.

a, Learning curves for 9 individual mice (gray) and the mean (black) showing the duration of time spent to perform standard (left) and backtracking (right) sequences. b, Similar to (a) but limited to the interval following the middle lick in standard (left) or backtracking (right) sequences. c, L, L’ and Θ patterns for seven consecutive licks aligned at the Mid touch (number 0). Licks in standard sequences (n = 7458 trials) are shown in black, those in backtracking sequences (n = 2695 trials) are in green. Mean ± s.d. d, Probability distributions of instantaneous lick rate for each interval separating consecutive pairs of the seven licks during standard (black) or backtracking (green) sequences (n = 8 mice; mean ± s.d.). e, Top, time to locate the port at its next position during the 4th interval, for standard sequences (black) or for sequences when the port backtracked (green). Bottom, the number of missed licks during the 4th interval. Mean ± 95% bootstrap confidence interval. n = 7458 standard and 2695 backtracking sequences from 47 total sessions.

Extended Data Fig. 3 Closed-loop optogenetic inhibition defines cortical areas involved in sequence control.

a, Left, dorsal view of an example “clear-skull” preparation. Right, table shows the center coordinates used for illumination for each target region. b, Triggering scheme for photoinhibition at sequence initiation, mid-sequence and water consumption. c, Average spike waveform of putative pyramidal cells (black; n = 224) and putative FS neurons (blue; n = 117), normalized to the amplitude of negative peaks. d, Relationship between spike widths (defined as the trough to peak time of average waveform) and changes in mean spike rate under opto illumination (4 mW, within 1 mm) relative to baseline. Pyramidal cells (black; n = 42) and FS neurons (blue; n = 41) were classified by the two thresholds (dashed lines at 0.4 and 0.5 ms) with ambiguous units (gray; n = 6) in the middle. e, Distributions of spike widths from neurons in (d) (filled bars; n = 89) and from all neurons (empty bars; n = 414) including those where illuminations were not at recording sites. Classification thresholds are shown in dashed lines. f, Left, inhibition efficiency of putative pyramidal cells as a function of light power and distance away from the center of illumination (n = 224 units total). Right, similar to left but showing the excitation efficiency of putative FS neurons (n = 117 units total). Mean ± 95% hierarchical bootstrap confidence interval. g, Example trial with S1TJ inhibition triggered at mid-sequence. Instantaneous tongue angle (Θ) and length (L) are shown in lighter traces. Shooting angles (Θshoot) and maximum length (Lmax) of each lick are marked using stems on top of the instantaneous traces. The blue waveform indicates photostimulation. Traces and markers during photostimulation are colored blue. h, Similar to (g) but inhibiting ALM–M1TJ. i, Similar to (g) but inhibiting S1BF. j, Changes in licking kinematics (rows) when inhibiting each of the five brain regions (columns), quantified across all three inhibition periods (Methods). Bar plots show mean ± 99% hierarchical bootstrap confidence interval. Gray lines show the data of individual mice. Two-tailed hierarchical bootstrap test, p < 0.001, p < 0.01, p < 0.05, n.s. p ≥ 0.05, after Bonferroni correction for 15 comparisons. k, Changes in the rate of lick (solid bars) and touch (dashed bars) at each of the inhibition periods (rows) when inhibiting each of the five brain regions (columns). Plot style and statistical tests are the same as in (j) but using Bonferroni correction for 30 comparisons. l, Same convention as in (j) but showing results with half-power (2 mW) inhibition. m, Same convention as in (k) but showing results with half-power (2 mW) inhibition.

Extended Data Fig. 4 Characterization of single-unit responses.

a, Contamination rates and refractory period violation rates of all recorded single- (green) and multi-units (black). The shaded region shows the thresholds for assignment as multi- vs single-unit. b, CDF of contamination rate including single- (green) and multi-units (gray). c, Same as (b) but for refractory period violation rate. d, The number of single- (green) and multi-units (black) recorded in each session, grouped by brain area. e, ISI histograms of randomly selected single-units. Refractory period violation rates (RPV) and contamination rates (Con) are labeled on the top (in percent). f, Responses of three simultaneously recorded S1TJ neurons during right-to-left (top half) or left-to-right (bottom half) licking sequences, aligned at cue onset (left column), middle touch (middle column), and the last consummatory touch (right column). For each sequence direction, the first row shows rasters of lick times (touches in black and misses in gray) from 10 selected trials (Methods). Stacked below are spike rasters and the corresponding PETHs (mean ± s.e.) from the same 10 trials for each example neuron. g, Same as (f) but for three example neurons from M1TJ. h, Same as (f) but for three example neurons from ALM. i, Uncertainty in mean spike rate (normalized to peak) estimated by bootstrap crossvalidation (Methods). Each data point is the bootstrap average value of the root mean squared error (RMSE) for a single neuron. Data (n = 804 neurons) are grouped by brain region and presented in whisker-box plots (centre mark: median, bounds of box: 25th and 75th percentiles, max whisker length: 1.5 times IQR, no max or min limit). j, The probability (mean ± 95% bootstrap confidence interval) of a PETH being consistently grouped into the same cluster across bootstrap iterations for different total numbers of clusters. Maximal consistency was achieved when using thirteen clusters for NNMF (arrow). k, NNMF components that represent each of the thirteen PETH clusters. Right-to-left (blue) and left-to-right (red) activities (mean ± 95% bootstrap confidence interval) are overlaid together. The vertical lines are located at time zero in each period. The height of the lines represents the scale of normalized neuronal activity from 0 to 1. l, Histograms of PETH peak times. Plot organization and time alignment are the same as in (f). m, Proportions of neurons from different clusters at different cortical depths. Some clusters with similar types of response were grouped together for better readability. ALM (n = 324), M1TJ (n = 233) and S1TJ (n = 119). n, Quantification of rhythmicity in PETHs. Black traces are mid-sequence PETHs of three example neurons in (f), (g), and (h). Colored traces show the best fit licking rhythms (6.5 Hz sinusoids). Average Pearson’s correlation coefficients (ravg) of the left-to-right and right-to-left fits are shown beneath neuron IDs. o, Empirical CDFs of ravg for neurons in S1TJ, M1TJ, and ALM. Circles mark the values of the 9 example neurons in (f), (g), and (h).

Extended Data Fig. 5 Additional analyses for population coding.

a, Relative goodness of fit of tongue angle regressions with a range of shifts in spike times. Black traces and error bars show mean ± 95% bootstrap confidence interval. Lighter traces show individual recordings. (S1TJ, n = 8 sessions; M1TJ, n = 9 sessions; ALM, n = 13 sessions). b, Absolute pairwise Pearson’s correlation coefficients among the five behavioral variables (mean; n = 35 sessions). c, Single-trial decoding of the five behavioral variables (rows; black traces) from 29 simultaneously recorded S1TJ units in a right-to-left (left) and a left-to-right (right) sequence. d, Same as (c) but decoding from 58 simultaneously recorded units in ALM. e, Total percent variance explained (VE) by the first five principal components (left in each region) versus that by the five coding axes (right in each region) during sequence execution. Lighter lines show individual recording sessions and thicker lines show the means. f, Absolute pairwise cosine values among coding axes (mean; n = 35 sessions). g, Cumulative time histograms showing the fraction of trials that could be correctly classified as a standard vs backtracking sequence as time progresses. Two-tailed bootstrap test, p ≈ 0, n.s. p = 0.91. h, Same as sequence progress in Fig. 3a, b, but for “zigzag” sequences.

Extended Data Fig. 6 Reward modulation of activity in ALM.

a, Responses of two simultaneously recorded ALM neurons (number 1 and number 2) aligned at the first lick (specifically the middle of a tongue-out period) that touched water reward. For each sequence direction, shown at top are rasters of lick times (touches in black and misses in gray) and the duration of water delivery (blue) from 20 selected trials (Methods). Stacked below are spike rasters and the corresponding PETHs from the same 20 trials for each example neuron. b, The probability of licking (i.e. tongue-out) as a function of time. Licks are sequentially indexed with respect to the first lick (number 0) touching the water. c, Patterns of kinematics and force for single licks around the first lick (number 0) touching water (n = 25289 trials; mean ± 95% bootstrap confidence interval). The duration of individual licks was normalized. The total force (Ftotal) is the vector sum of vertical and lateral forces. d, Decoding of τ, I and θ (mean ± 99% bootstrap confidence interval) from neuronal populations recorded in ALM (n = 13 sessions), M1TJ (n = 9 sessions), and S1TJ (n = 8 sessions) in right-to-left (blue) or left-to-right (red) trials around the consumption period. e, The difference between the decoded θ traces in right-to-left versus left-to-right trials. Same data source, mean and error presentation as in (d).

Extended Data Fig. 7 Coding of upcoming sequences in ALM.

a, Depiction of sequences performed by a mouse in alternating directions across 14 consecutive trials. Trial onsets are marked by yellow lines. Port positions shown in the black trace are overlaid with touch onsets (dots). b, Probability distributions of Θshoot (left) and Lmax (middle) for the first 3 licks at the start of a sequence (n = 8 mice; mean ± s.d.). The negative y-axis of Θshoot points to the side at which the port is located. The CDF (right; 8 individual mice in gray and the mean in black) of the maximal Θshoot explored before touching the port (at the side of negative Θshoot). The blue line shows the probability of successfully locating the port without exploring beyond the midline. c, Top, rasters of two example neurons which had persistent and target position (TP) selective firing during the 14 consecutive trials in (a). Bottom, normalized and smoothed (0.25 s s.d. Gaussian kernel) spike rates of the two neurons. d, Decoded instantaneous TP (dark trace) from 58 simultaneously recorded units in ALM, overlaid with normalized port position (light trace). e, Decoding of TP from ALM (mean ± 99% bootstrap confidence interval) before upcoming right-to-left trials (blue) or left-to-right trials (red). Crossvalidated R2 is shown (mean ± s.d.; n = 13 sessions). f, Goodness of fit for linear models that predict TP during ITIs, quantified by crossvalidated R2. g, Using the same linear models in (e) to decode TP during execution of standard right-to-left (blue) or left-to-right (red) sequences (mean ± 99% bootstrap confidence interval). h, Same as (f) but for τ.

Supplementary information

Reporting Summary

Supplementary Table 1

Mouse information. Excel workbook detailing assignment of individual mice to experiments and figures.

Supplementary Video 1

Example performance in a standard sequence. Top, high-speed video capturing the bottom and side views of the mouse. The tracked base and the tip of the tongue are labeled by red asterisks. Bottom, time-aligned behavioral variables and events similar to Fig. 1d. A moving bar indicates the position of the current frame. The playback was slowed down 5-fold.

Supplementary Video 2

Example performance in a backtracking sequence. Same conventions as for Supplementary Video 1.

Supplementary Video 3

Example trial with inhibition in S1TJ at sequence initiation. Similar conventions as for Supplementary Video 1 but showing the waveform of optogenetic inhibition (instead of the vertical and lateral lick forces).

Supplementary Video 4

Example trial with inhibition in ALM at sequence initiation. Same conventions as for Supplementary Video 3.

Supplementary Video 5

Example trial with low-power inhibition in M1B at consumption. Same conventions as for Supplementary Video 3.

Supplementary Video 6

Example performance in a zigzag sequence. Same conventions as for Supplementary Video 1.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Xu, D., Dong, M., Chen, Y. et al. Cortical processing of flexible and context-dependent sensorimotor sequences. Nature 603, 464–469 (2022). https://doi.org/10.1038/s41586-022-04478-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41586-022-04478-7

This article is cited by

Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.

Search

Quick links

Nature Briefing

Sign up for the Nature Briefing newsletter — what matters in science, free to your inbox daily.

Get the most important science stories of the day, free in your inbox. Sign up for Nature Briefing