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:

Behaviorally relevant decision coding in primary somatosensory cortex neurons

An Author Correction to this article was published on 21 November 2022

This article has been updated

Abstract

Primary sensory cortex is thought to process incoming sensory information, while decision variables important for driving behavior are assumed to arise downstream in the processing hierarchy. Here, we used population two-photon calcium imaging and targeted two-photon optogenetic stimulation of neurons in layer 2/3 of mouse primary somatosensory cortex (S1) during a texture discrimination task to test for the presence of decision signals and probe their behavioral relevance. Small but distinct populations of neurons carried information about the stimulus irrespective of the behavioral outcome (stimulus neurons), or about the choice irrespective of the presented stimulus (decision neurons). Decision neurons show categorical coding that develops during learning, and lack a conclusive decision signal in Miss trials. All-optical photostimulation of decision neurons during behavior improves behavioral performance, establishing a causal role in driving behavior. The fact that stimulus and decision neurons are intermingled challenges the idea of S1 as a purely sensory area, and causal perturbation suggests a direct involvement of S1 decision neurons in the decision-making process.

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: Imaging task-dependent activity in L2/3 barrel cortex during a two-choice texture discrimination task.
Fig. 2: Stimulus and decision coding in L2/3 barrel cortex neurons.
Fig. 3: Subset-specific activity patterns and timing in stimulus and decision neurons.
Fig. 4: Categorical coding in decision neurons develops with learning.
Fig. 5: Miss trials lack a conclusive decision signal.
Fig. 6: Cell-type specific functional connectivity of stimulus and decision coding neurons.
Fig. 7: Activation of neurons with correct choice selectivity improves behavioral performance.

Similar content being viewed by others

Data availability

The data that support the findings of this study are available from the corresponding authors upon reasonable request.

Code availability

The analysis code used in this study are available from the corresponding authors upon reasonable request.

Change history

References

  1. Hubel, D. H. & Wiesel, T. N. Receptive fields, binocular interaction and functional architecture in the cat’s visual cortex. J. Physiol. 160, 106–154 (1962).

    CAS  PubMed  PubMed Central  Google Scholar 

  2. Hernandez, A., Zainos, A. & Romo, R. Neuronal correlates of sensory discrimination in the somatosensory cortex. Proc. Natl Acad. Sci. USA 97, 6191–6196 (2000).

    CAS  PubMed  PubMed Central  Google Scholar 

  3. Arabzadeh, E., Zorzin, E. & Diamond, M. E. Neuronal encoding of texture in the whisker sensory pathway. PLoS Biol. 3, e17 (2005).

    PubMed  PubMed Central  Google Scholar 

  4. Romo, R. & de Lafuente, V. Conversion of sensory signals into perceptual decisions. Prog. Neurobiol. 103, 41–75 (2013).

    PubMed  Google Scholar 

  5. Brody, C. D. & Hanks, T. D. Neural underpinnings of the evidence accumulator. Curr. Opin. Neurobiol. 37, 149–157 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  6. Hanks, T. D., Ditterich, J. & Shadlen, M. N. Microstimulation of macaque area LIP affects decision-making in a motion discrimination task. Nat. Neurosci. 9, 682–689 (2006).

    CAS  PubMed  PubMed Central  Google Scholar 

  7. Kim, J.-N. & Shadlen, M. N. Neural correlates of a decision in the dorsolateral prefrontal cortex of the macaque. Nature 2, 176–185 (1999).

    Google Scholar 

  8. Horwitz, G. D. & Newsome, W. T. Separate signals for target selection and movement specification in the superior colliculus. Science 284, 1158–1161 (1999).

    CAS  PubMed  Google Scholar 

  9. Barlow, H. B. in Sensory Communication (ed. Rosenblith, W. A.) Ch. 13 (MIT Press, 2012).

  10. Rossi-Pool, R. et al. Emergence of an abstract categorical code enabling the discrimination of temporally structured tactile stimuli. Proc. Natl Acad. Sci. USA 113, E7966–E7975 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  11. de Lafuente, V. & Romo, R. Neural correlate of subjective sensory experience gradually builds up across cortical areas. Proc. Natl Acad. Sci. USA 103, 14266–14271 (2006).

    PubMed  PubMed Central  Google Scholar 

  12. Romo, R., Hernandez, A., Zainos, A., Lemus, L. & Brody, C. D. Neuronal correlates of decision-making in secondary somatosensory cortex. Nat. Neurosci. 5, 1217–1225 (2002).

    CAS  PubMed  Google Scholar 

  13. Fassihi, A., Akrami, A., Pulecchi, F., Schonfelder, V. & Diamond, M. E. Transformation of perception from sensory to motor cortex. Curr. Biol. 27, 1585–1596 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

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

    CAS  PubMed  Google Scholar 

  15. McGuire, L. M. et al. Short time-scale sensory coding in S1 during discrimination of whisker vibrotactile sequences. PLoS Biol. 14, e1002549 (2016).

    PubMed  PubMed Central  Google Scholar 

  16. Sachidhanandam, S., Sreenivasan, V., Kyriakatos, A., Kremer, Y. & Petersen, C. C. Membrane potential correlates of sensory perception in mouse barrel cortex. Nat. Neurosci. 16, 1671–1677 (2013).

    CAS  PubMed  Google Scholar 

  17. Kwon, S. E., Yang, H., Minamisawa, G. & O’Connor, D. H. Sensory and decision-related activity propagate in a cortical feedback loop during touch perception. Nat. Neurosci. 19, 1243–1249 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  18. Yang, H., Kwon, S. E., Severson, K. S. & O’Connor, D. H. Origins of choice-related activity in mouse somatosensory cortex. Nat. Neurosci. 19, 127–134 (2016).

    CAS  PubMed  Google Scholar 

  19. Chen, J. L., Carta, S., Soldado-Magraner, J., Schneider, B. L. & Helmchen, F. Behaviour-dependent recruitment of long-range projection neurons in somatosensory cortex. Nature 499, 336–340 (2013).

    CAS  PubMed  Google Scholar 

  20. Musall, S., Kaufman, M. T., Juavinett, A. L., Gluf, S. & Churchland, A. K. Single-trial neural dynamics are dominated by richly varied movements. Nat. Neurosci. 22, 1677–1686 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  21. Stringer, C. et al. Spontaneous behaviors drive multidimensional, brainwide activity. Science 364, 255 (2019).

    PubMed  PubMed Central  Google Scholar 

  22. Steinmetz, N. A., Zatka-Haas, P., Carandini, M. & Harris, K. D. Distributed coding of choice, action and engagement across the mouse brain. Nature 576, 266–273 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  23. Poort, J. et al. Learning enhances sensory and multiple non-sensory representations in primary visual cortex. Neuron 86, 1478–1490 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  24. Scott, B. B. et al. Imaging cortical dynamics in GCaMP transgenic rats with a head-mounted widefield macroscope. Neuron 100, 1045–1058 (2018).

    CAS  PubMed  PubMed Central  Google Scholar 

  25. Brecht, M., Roth, A. & Sakmann, B. Dynamic receptive fields of reconstructed pyramidal cells in layers 3 and 2 of rat somatosensory barrel cortex. J. Physiol. 553, 243–265 (2003).

    CAS  PubMed  PubMed Central  Google Scholar 

  26. Nienborg, H. & Cumming, B. Correlations between the activity of sensory neurons and behavior: how much do they tell us about a neuron’s causality. Curr. Opin. Neurobiol. 20, 376–381 (2010).

    CAS  PubMed  PubMed Central  Google Scholar 

  27. Katz, L. N., Yates, J. L., Pillow, J. W. & Huk, A. C. Dissociated functional significance of decision-related activity in the primate dorsal stream. Nature 535, 285–288 (2016).

    CAS  PubMed  PubMed Central  Google Scholar 

  28. Rickgauer, J. P., Deisseroth, K. & Tank, D. W. Simultaneous cellular-resolution optical perturbation and imaging of place cell firing fields. Nat. Neurosci. 17, 1816–1824 (2014).

    CAS  PubMed  PubMed Central  Google Scholar 

  29. Carrillo-Reid, L., Han, S., Yang, W., Akrouh, A. & Yuste, R. Controlling visually guided behavior by holographic recalling of cortical ensembles. Cell 178, 447–457(2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  30. Daie, K., Svoboda, K. & Druckmann, S. Targeted photostimulation uncovers circuit motifs supporting short-term memory. Nat. Neurosci. 24, 259–265 (2021).

    CAS  PubMed  Google Scholar 

  31. Marshel, J. H. et al. Cortical layer-specific critical dynamics triggering perception. Science 365, eaaw5202 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  32. Russell, L. E. et al. All-optical interrogation of neural circuits in behaving mice. Nat. Protoc. 17, 1579–1620 (2022).

    CAS  PubMed  Google Scholar 

  33. Peron, S. P., Freeman, J., Iyer, V., Guo, C. & Svoboda, K. A cellular resolution map of barrel cortex activity during tactile behavior. Neuron 86, 783–799 (2015).

    CAS  PubMed  Google Scholar 

  34. Britten, K. H., Newsome, W. T., Shadlen, M. N., Celebrini, S. & Movshon, J. A. A relationship between behavioral choice and the visual response of neurons in macaque MT. Vis. Neurosci. 13, 87–100 (1996).

    CAS  PubMed  Google Scholar 

  35. Okun, M. et al. Diverse coupling of neurons to populations in sensory cortex. Nature 521, 511–515 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  36. Ko, H. et al. Functional specificity of local synaptic connections in neocortical networks. Nature 473, 87–91 (2011).

    CAS  PubMed  PubMed Central  Google Scholar 

  37. Shadlen, M. N. & Newsome, W. T. The variable discharge of cortical neurons: Implications for connectivity, computation, and information coding. J. Neurosci. 18, 3870–3896 (1998).

    CAS  PubMed  PubMed Central  Google Scholar 

  38. Chen, J. L. et al. Pathway-specific reorganization of projection neurons in somatosensory cortex during learning. Nat. Neurosci. 18, 1101–1108 (2015).

    PubMed  Google Scholar 

  39. Keller, G. B. & Mrsic-Flogel, T. D. Predictive processing: a canonical cortical computation. Neuron 100, 424–435 (2018).

    CAS  PubMed  PubMed Central  Google Scholar 

  40. Russell, L. E. et al. The influence of visual cortex on perception is modulated by behavioural state. Preprint at bioRxiv https://doi.org/10.1101/706010 (2019).

  41. & Dalgleish, H. W. P. et al. How many neurons are sufficient for perception of cortical activity?. eLife 9, e58889 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  42. Robinson, N. T. M. et al. Targeted activation of hippocampal place cells drives memory-guided spatial behavior. Cell 183, 1586–1599 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  43. Chettih, S. N. & Harvey, C. D. Single-neuron perturbations reveal feature-specific competition in V1. Nature 567, 334–340 (2019).

    CAS  PubMed  PubMed Central  Google Scholar 

  44. Hong, Y. K., Lacefield, C. O., Rodgers, C. C. & Bruno, R. M. Sensation, movement and learning in the absence of barrel cortex. Nature 561, 542–546 (2018).

    CAS  PubMed  PubMed Central  Google Scholar 

  45. Kawai, R. et al. Motor cortex is required for learning but not for executing a motor skill. Neuron 86, 800–812 (2015).

    CAS  PubMed  PubMed Central  Google Scholar 

  46. Park, J. M. et al. Deep and superficial layers of the primary somatosensory cortex are critical for whisker-based texture discrimination in mice. Preprint at bioRxiv https://doi.org/10.1101/2020.08.12.245381 (2022).

  47. Wolfe, J. et al. Texture coding in the rat whisker system: slip-stick versus differential resonance. PLoS Biol. 6, e215 (2008).

    PubMed  PubMed Central  Google Scholar 

  48. Guic-Robles, E., Jenkins, W. M. & Bravo, H. Vibrissal roughness discrimination is barrelcortex-dependent. Behav. Brain Res. 48, 145–152 (1992).

    CAS  PubMed  Google Scholar 

  49. Shadlen, M. N. & Newsome, W. T. Motion perception: seeing and deciding. Proc. Natl Acad. Sci. USA 93, 628–633 (1996).

    CAS  PubMed  PubMed Central  Google Scholar 

  50. Nienborg, H., Cohen, M. R. & Cumming, B. G. Decision-related activity in sensory neurons: correlations among neurons and with behavior. Annu Rev. Neurosci. 35, 463–483 (2012).

    CAS  PubMed  Google Scholar 

  51. Parker, A. J. & Newsome, W. T. Sense and the single neuron: probing the physiology of perception. Annu. Rev. Neurosci. 21, 227–277 (1998).

    CAS  PubMed  Google Scholar 

  52. Shadlen, M. N., Britten, K. H., Newsome, W. T. & Movshon, J. A. A computational analysis of the relationship between neuronal and behavioral responses to visual motion. J. Neurosci. 16, 1486–1510 (1996).

    CAS  PubMed  PubMed Central  Google Scholar 

  53. Peron, S. et al. Recurrent interactions in local cortical circuits. Nature 579, 256–259 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  54. Condylis, C. et al. Context-dependent sensory processing across primary and secondary somatosensory cortex. Neuron 106, 515–525 (2020).

    CAS  PubMed  PubMed Central  Google Scholar 

  55. Felleman, D. J. & Van Essen, D. C. Distributed hierarchical processing in the primate. Cereb. Cortex 1, 1–47 (1991).

    CAS  PubMed  Google Scholar 

  56. Freedman, D. J. & Assad, J. A. Neuronal mechanisms of visual categorization: an abstract view on decision making. Annu Rev. Neurosci. 39, 129–147 (2016).

    CAS  PubMed  Google Scholar 

  57. Panzeri, S., Harvey, C. D., Piasini, E., Latham, P. E. & Fellin, T. Cracking the neural code for sensory perception by combining statistics, intervention, and behavior. Neuron 93, 491–507 (2017).

    CAS  PubMed  PubMed Central  Google Scholar 

  58. Churchland, P. S., Ramachandran, V. S. & Sejnowski, T. J. in Large-Scale Neuronal Theories of the Brain (eds Koch, C. & Davis, J. L.) Ch. 2 (MIT Press, 1994).

  59. Chen, T. W. et al. Ultrasensitive fluorescent proteins for imaging neuronal activity. Nature 499, 295–300 (2013).

    CAS  PubMed  PubMed Central  Google Scholar 

  60. Steinmetz, N. A. et al. Aberrant cortical activity in multiple GCaMP6-expressing transgenic mouse lines. eNeuro https://doi.org/10.1523/ENEURO.0207-17.2017 (2017).

  61. Dana, H. et al. High-performance calcium sensors for imaging activity in neuronal populations and microcompartments. Nat. Methods 16, 649–657 (2019).

    CAS  PubMed  Google Scholar 

  62. Mathis, A. et al. DeepLabCut: markerless pose estimation of user-defined body parts with deep learning. Nat. Neurosci. 21, 1281–1289 (2018).

    CAS  PubMed  Google Scholar 

  63. Guo, Z. V. et al. Procedures for behavioral experiments in head-fixed mice. PLoS One 9, e88678 (2014).

    PubMed  PubMed Central  Google Scholar 

  64. Watson, B. O., Yuste, R. & Packer, A. M. PackIO and EphysViewer: software tools for acquisition and analysis of neuroscience data. Preprint at bioRxiv https://doi.org/10.1101/054080 (2016).

  65. Packer, A. M., Russell, L. E., Dalgleish, H. W. & Häusser, M. Simultaneous all-optical manipulation and recording of neural circuit activity with cellular resolution in vivo. Nat. Methods 12, 140–146 (2015).

    CAS  PubMed  Google Scholar 

  66. Gerchberg, R. W. & Saxton, W. O. A practical algorithm for the determination of phase from image and diffraction plane pictures. Optik 35, 237–246 (1972).

    Google Scholar 

  67. Giovannucci, A. et al. CaImAn an open source tool for scalable calcium imaging data analysis. eLife 17, e38173 (2019).

    Google Scholar 

  68. & Kobak, D. et al. Demixed principal component analysis of neural population data. eLife 5, e10989 (2016).

    PubMed  PubMed Central  Google Scholar 

  69. Zhang, Z., Russell, L. E., Packer, A. M., Gauld, O. M. & Hausser, M. Closed-loop all-optical interrogation of neural circuits in vivo. Nat. Methods 15, 1037–1040 (2018).

    CAS  PubMed  PubMed Central  Google Scholar 

  70. Pachitariu, M. et al. Suite2p: beyond 10,000 neurons with standard two-photon microscopy. Preprint at bioRxiv https://doi.org/10.1101/061507 (2016).

  71. Cohen, M. R. & Kohn, A. Measuring and interpreting neuronal correlations. Nat. Neurosci. 14, 811–819 (2011).

    CAS  PubMed  PubMed Central  Google Scholar 

  72. Averbeck, B. B., Latham, P. E. & Pouget, A. Neural correlations, population coding and computation. Nat. Rev. Neurosci. 7, 358–366 (2006).

    CAS  PubMed  Google Scholar 

Download references

Acknowledgements

We are grateful to S. Chun, M. Hoddinott and O. Houghton for help with animal husbandry; A. O’Leary, E. Ordonneau, D. Vardalakis, R. Ratto and O. Houghton for help with training mice; and A. Roth, D. Kostadinov, N. Robinson, M. Fisek, B. Bicknell and M. London for helpful discussions and comments on the manuscript. We thank L. Russell for providing PyBehavior software and P. Dzialecka for contributing to the initial development of the pyRTAOI real-time all-optical control software. C.B. was supported by an EMBO Long-Term Fellowship and a Marie Curie Fellowship from the EU. M.P. was supported by a LIDO scholarship from the BBSRC. E.B. was supported through the Erasmus+ Traineeship programme by the EU. M.H. was supported by the Wellcome Trust (PRF 201225/Z/16/Z and 224668/Z/21/Z), BBSRC (BB/N009835/1) and ERC (AdG 695709). The funders had no role in study design, data collection and analysis, decision to publish or preparation of the manuscript.

Author information

Authors and Affiliations

Authors

Contributions

C.B. and M.H. conceived the project. C.B. and Z.Z. designed the experiments. Z.Z. developed software and performed all-optical experiments. C.B., Z.Z., M.P., J.S., E.B. and S.M. performed experiments. C.B., S.M. and Z.Z. analyzed whisker data. C.B. and Z.Z. analyzed the data. C.B., Z.Z. and M.H. wrote the manuscript.

Corresponding authors

Correspondence to Christina Buetfering or Michael Häusser.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Nature Neuroscience thanks Michael Brecht, Samuel Hires and the other, anonymous, reviewer(s) 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

Extended Data Fig. 1 Behavioral performance of expert mice in the two-choice two-texture discrimination task.

Behavioral performance in all sessions of all mice (n = 13 mice) included in the analysis (excluding experiments using targeted photostimulation). Mean discrimination was calculated as percentage of Correct trials over all Correct and Incorrect trials. Maximum discrimination was calculated in a sliding window of 50 trials containing at least 12 trials with responses (Correct or Incorrect). Data are presented as mean values ± s.e.m.

Extended Data Fig. 2 Stimulus and choice selectivity in L2/3 S1 neurons.

(a) ROC curves in an example stimulus and an example decision neuron. The stimulus neuron prefers Stimulus 1 trials in Correct and Incorrect trials (top left) but does not differentiate between Correct and Incorrect trials with the same stimulus type (top right). The decision neuron has a strong preference for Stimulus 1 in Correct trials but prefers Stimulus 2 in Incorrect trials, that is follows the choice of the mouse and not the stimulus (bottom left). This also shows when comparing activity between Correct and Incorrect trials of the same Stimulus type (bottom right). (b) ROC AUC values for all neurons when comparing activity between Stim 1 and Stim 2 trials (left) and Correct and Incorrect trials (right). (c) The percentage of stimulus, decision and other neurons that show significant choice selectivity in at least one stimulus condition (left) or both stimulus conditions (right). (d) Number and percentage of stimulus and decision coding neurons per FOV (693 ×693 μm). N = 14 FOVs (13 mice), mean ± s.e.m.. Average trial activity 1 s before the lick (left, Fig. 2c), average trial activity from 1 s before the lick to 0.1 s before the lick (right). Gray open circles denote single FOVs.

Extended Data Fig. 3 Spatial clustering of stimulus and decision neurons.

(a) Distribution of z-scores for mean pairwise distances. Z-score < 0 means that neurons are more clustered, z-score > 0 means that neurons are less clustered than a randomly selected group of neurons in the FOV. N = 73 FOVs, Test against 0, two-sided Wilcoxon rank sum test. (b) Distribution of absolute distances to the nearest barrel center for all decision neurons (left) and stimulus neurons (right). Control distribution has been calculated from the same number of randomly selected neurons across the FOV. Two-sided Wilcoxon rank sum test. (c) Mean distance from the nearest barrel (normalized to a shuffled distribution of randomly selected neurons across the FOV) for each session. Data are presented as mean values ± s.d., two-sided Wilcoxon signed-rank test.

Extended Data Fig. 4 Gaussian GLM to identify neurons whose activity is predicted by choice.

(a) Extraction of whisking kinematics from high-speed videography using DeepLabCut in an example trial. (b) Covariance matrix for GLM regressors. (c) Gaussian GLM predicting trial activity in an example neuron. (d) All neurons of an example session and their delta R2, that is the difference between R2 of the full model and the R2 of the mean of the distribution of random regressor models. (e) Left, explained variance by full model for all neurons. Inlay is the same data but plotted on a log scale to see that functionally identified neurons have more variance explained by the GLM analysis than other neurons. Right, Variance explained by each regressor individually for neurons identified as stimulus, choice, running or whisking neurons by the GLM analysis. Inlay is the same data but plotted on a log scale to see that the neurons with more variance explained by the respective regressor are identified as choice, stimulus, running or whisking neurons respectively. (f) Two-dimensional embedding of the explained variance for each regressor for all neurons. Significant contribution of a regressor to the prediction of neural activity is colored (Purple = Stimulus; Green = Choice; Blue = Running; Orange = Whisking). Neurons with multiple significant regressors show mixed colors.

Extended Data Fig. 5 Timing of stimulus and decision neuron activity.

(a) Peak activity of single neurons with respect to the go cue or the first lick. The majority of neurons exhibits peak activity before the go cue and lick in the stimulus and decision neuron subgroup. (b) The time of first touch in all trials in a subset of sessions. Left, All first touch times across sessions. Right, First touch times color-coded by session. N = 8 sessions. (c) Activity of stimulus and decision neurons averaged across sessions and aligned to the stimulus onset (left), the lick of the mouse (center) or the first whisker touch (right). Line and shaded area represent mean ± s.e.m.. (d) The same activity traces but sorted by neuron type and aligned to the peak.

Extended Data Fig. 6 Learning and decision coding in trials with uninformed licks.

(a) Increase in performance between the first day of training of the four texture task and the expert session. Each session was divided into windows of trials containing 5 trials (step size 1) with the new textures and we calculated the percentage of windows that contain a percentage of Correct Trials that is above 70%. Round marker: first session; cross marker: expert session. Data are presented as mean values ± s.e.m.. P-values of a two-sided Wilcoxon rank sum test are: Mouse 1: p = 0.01, mouse 2: p = 0.0005, mouse 3: p = 0.72, mouse 4: p = 0.01. N = number of windows: Mouse 1: 123/184, mouse 2: 206/223, mouse 3: 132/149, mouse 4: 136/173. Colors indicate different mice similar to the color code in Fig. 4c. (b) Validation accuracy of a linear classifier trained using decision neuron activity in correct Lickport S/R trials with Stim S/R presented or random Lickport S/R trials with Stim S2/R2 presented on the first day of four-texture training (n = 6 mice). Random S2/R2 trials occurred during stretches of behavior (50 trials) with chance level performance in S2 and/or R2 trials. Two-sided Wilcoxon signed-rank test. (c) The same as b) but using decision neuron activity in correct trials with either Stim S/R or Stim S2/R2 presented in the best four-texture session for each mouse (n = 6 mice). Two-sided Wilcoxon signed-rank test.

Extended Data Fig. 7 Distribution of Miss trials in the session and whisking, running and fluorescence during Miss trials.

(a) Distribution of Miss Stimulus- and Miss Stimulus+ trials in each session. Session length has been normalized. N = 66 sessions, stars indicate bins with p < 0.0025 (Bonferroni corrected significance level), two-sided Wilcoxon signed-rank test. (b) Whisking amplitude before the go cue in Correct, Miss, Miss Stimulus- and Miss Stimulus+ trials in a subset of sessions with whisker kinematics. Data are presented as mean values ± s.d., n = 15 sessions, two-sided Wilcoxon signed-rank test. (c) Running speed before the go cue in Correct, Miss, Miss Stimulus- and Miss Stimulus+ trials in a subset of sessions with whisker kinematics. Data are presented as mean values ± s.d., n = 15 sessions, two-sided Wilcoxon signed-rank test. (d) Fluorescence traces (z-scored) in two example sessions split by neuron type and trial type. Thick black line indicates the mean. (e) Mean trial activity in stimulus and decision neurons. Data are presented as mean ± s.d., n = 57 sessions, two-sided Wilcoxon signed-rank test. (f) Prediction accuracy of a classifier trained on correct trials to predict stimulus type or choice with stimulus neuron activity (left) or decision neuron activity (right) in incorrect trials. Mean ± s.e.m., n = 63 sessions, two-sided Wilcoxon signed-rank test.

Extended Data Fig. 8 Online target selection for photostimulation.

(a) Online target selection procedure. Left to right: (1) ROIs were detected from live imaging stream (15 to 25 minutes). (2) Trial selectivity of each ROI was estimated from a baseline imaging session (during behavior, 150 trials). (3) Quality of each ROI was assessed with a convolutional neural network (CNN) based method. ROIs with low probability of being a neuron were excluded from target selection (threshold 0.15–0.3). (4) Photostimulation response of the trial-coding neurons that were screened for photo-excitability. Dashed and solid circles mark the target ensembles selected by this procedure. Representative of 7 mice. (b) Comparison of ROIs detected online and post-hoc. Thick dashed and solid circles mark the loci of light spirals used during the experiment for activating the target ensembles. Thin circles mark cells within the photostimulation spatial resolution. Pixel intensity indicates the weight of each pixel in generating the signal extracted from each ROI (same for c and d). (c) Photostimulation response in the field-of-view when the two target ensembles were stimulated during the all-optical behavioral session (comparing photostim and no-photostim catch trials). (d) Trial selectivity of ROIs detected post-hoc. Scale bars in (ad), 100 μm. (e) Calcium time course of the directly activated cells in correct Stim S trials and correct Stim R trials. Thick line is mean; shaded area is s.d.. N = 80 target ensembles, 40 sessions, 7 mice. (f) Number of light spirals (10.3 ± 3.8), cells under spirals (light-targeted, 19.8 ± 8.2) and directly activated targets (7.9 ± 3.1) per photostimulation condition in catch trials (mean ± s.d.). N = 80 target ensembles, 40 sessions, 7 mice. (g) Trial selectivity of directly activated target ensembles (averaged across all activated targets in each ensemble. Data are presented as mean ± s.d., ****p < 0.0001, two-sided Wilcoxon signed-rank test). N = 27 out of the 40 sessions where both target ensembles meet the activation criteria (see Methods).

Extended Data Fig. 9 Stimulus and choice selectivity of targets and followers in targeted photostimulation experiments.

(a) Calcium timecourses of the directly activated target, positive follower and negative follower ensembles aligned to go cue (green vertical line). Thick line is mean; shaded area is s.d.. N = 80 target ensembles, 40 sessions, 7 mice. (b) The relative stimulus selectivity of the positive or negative followers compared with other background cells (non-followers) is positively or negatively correlated with the stimulus selectivity of the target ensembles, respectively (same dataset as in a). There is no significant correlation between the choice selectivity of the followers and that of the targets. R and p are the Pearson correlation coefficient and the p-value, respectively. (c) The absolute value of stimulus selectivity is higher than that of choice selectivity in target and background cells but is comparable to choice selectivity in the followers (targets, **p = 0.0046, n = 569 neurons; background cells, *p = 0.018, 10458 neurons; positive followers, n.s., p = 0.97, n = 558 neurons; negative followers, n.s. p = 0.29). 962 neurons, 40 sessions, 7 mice. Bars are mean, two-sided Wilcoxon signed-rank test.

Extended Data Fig. 10 Analysis of the behavioral effect of targeted photostimulation.

(a) Task performance measured as the percentage of correct choices over the total number of correct and incorrect choices the animal made in different types of trials (0.74 ± 0.028 and 0.73 ± 0.027 in PhotoBoost control trials and PhotoBoost trials, n.s., p = 0.59, n = 38 condition pairs; 0.78 ± 0.037, 0.75 ± 0.034 in PhotoDisrupt control trials and PhotoDisrupt trials, n.s., p = 0.73, n = 28 condition pairs; 32 sessions, 7 mice, two-sided Wilcoxon signed-rank test. 5 sessions where target ensembles were swapped in PhotoBoost and PhotoDisrupt were not included in this plot. Boxes are mean, whiskers are s.e.m.. (b) The change in texture discrimination performance in photostimulation trials is negatively correlated with the discrimination performance in the control trials, but apart from the conditions with perfect texture discrimination in control trials, photostimulation could induce both positive and negative change. (c) Lick rate in catch trials that received photostimulation (Photo+) is similar to the catch trials without photostimulation (Photo-). N = 44 photostimulation ensembles, n.s. p = 1, two-sided Wilcoxon signed-rank test. (d) The effect size of photostimulation on discrimination performance does not depend on the number or the spatial clustering (measured as the average pairwise distance between light spirals) of photostimulation sites. (e) The change in texture discrimination performance in photostimulation trials does not correlate with the average photostimulation response of the background cells. Same experiments as in Fig. 7b. (f) A linear regression model to predict discrimination performance change based on the weighted average photostimulation response by the stimulus or choice selectivity of targets and background neurons, as well as whisking amplitude. N = 60 photostimulation conditions, 29 sessions, 7 mice in which whisker movements were recorded by high-speed videography. Data are presented as mean ± s.e.m.. The p-values are for the t-statistic of the hypothesis test that the corresponding coefficient is equal to zero. (g) The change in discrimination performance does not correlate with the onset of photostimulation. (h) The performance of the online predictor does not correlate with the choice selectivity of the targets. g-h, Same experiments as in Fig. 7b. R and p are the Pearson correlation coefficient and the p value, respectively.

Supplementary information

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Buetfering, C., Zhang, Z., Pitsiani, M. et al. Behaviorally relevant decision coding in primary somatosensory cortex neurons. Nat Neurosci 25, 1225–1236 (2022). https://doi.org/10.1038/s41593-022-01151-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1038/s41593-022-01151-0

This article is cited by

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