Skip to main content

Main menu

  • HOME
  • CONTENT
    • Early Release
    • Featured
    • Current Issue
    • Issue Archive
    • Blog
    • Collections
    • Podcast
  • TOPICS
    • Cognition and Behavior
    • Development
    • Disorders of the Nervous System
    • History, Teaching and Public Awareness
    • Integrative Systems
    • Neuronal Excitability
    • Novel Tools and Methods
    • Sensory and Motor Systems
  • ALERTS
  • FOR AUTHORS
  • ABOUT
    • Overview
    • Editorial Board
    • For the Media
    • Privacy Policy
    • Contact Us
    • Feedback
  • SUBMIT

User menu

Search

  • Advanced search
eNeuro
eNeuro

Advanced Search

 

  • HOME
  • CONTENT
    • Early Release
    • Featured
    • Current Issue
    • Issue Archive
    • Blog
    • Collections
    • Podcast
  • TOPICS
    • Cognition and Behavior
    • Development
    • Disorders of the Nervous System
    • History, Teaching and Public Awareness
    • Integrative Systems
    • Neuronal Excitability
    • Novel Tools and Methods
    • Sensory and Motor Systems
  • ALERTS
  • FOR AUTHORS
  • ABOUT
    • Overview
    • Editorial Board
    • For the Media
    • Privacy Policy
    • Contact Us
    • Feedback
  • SUBMIT
PreviousNext
Research ArticleResearch Article: Methods/New Tools, Novel Tools and Methods

Reliable Inference of the Encoding of Task States by Individual Neurons Using Calcium Imaging

Huixin Huang, Garima Shah, Hita Adwanikar and Shreesh P. Mysore
eNeuro 20 January 2026, 13 (1) ENEURO.0378-25.2025; https://doi.org/10.1523/ENEURO.0378-25.2025
Huixin Huang
1Department of Psychological and Brain Sciences, Johns Hopkins University, Baltimore, Maryland 21218
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Garima Shah
1Department of Psychological and Brain Sciences, Johns Hopkins University, Baltimore, Maryland 21218
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Hita Adwanikar
1Department of Psychological and Brain Sciences, Johns Hopkins University, Baltimore, Maryland 21218
2The Solomon H. Snyder Department of Neuroscience, Johns Hopkins School of Medicine, Baltimore, Maryland 21218
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Shreesh P. Mysore
1Department of Psychological and Brain Sciences, Johns Hopkins University, Baltimore, Maryland 21218
2The Solomon H. Snyder Department of Neuroscience, Johns Hopkins School of Medicine, Baltimore, Maryland 21218
3Kavli Neuroscience Discovery Institute, Johns Hopkins University, Baltimore, Maryland 21218
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Shreesh P. Mysore
  • Article
  • Figures & Data
  • Info & Metrics
  • eLetters
  • PDF
Loading

Article Figures & Data

Figures

  • Extended Data
  • Figure 1.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 1.

    Study design. A–C, Experimental setup. A,B, Schematic of the experimental setup: AAV1/5 CaMKII-GCaMP6f virus is injected into the mPFC, and a GRIN lens is implanted above the injection site. After waiting 6–8 weeks for virus expression, the animal is placed on the elevated zero maze where its behavior and the calcium activity of simultaneously imaged mPFC neurons are recorded. C, Left, Box plot showing the percentage of time spent by mice in the open arm; each point represents an individual mouse (n = 8). Right, Imaged mPFC neurons expressing GCaMP6f from an example animal (top) and calcium traces of example neurons (bottom) extracted from the recorded video of a 20 min session. The time spent in open arms and closed arms is also shown. D–F, Characterizing the selectivity of individual neurons to open-arm versus closed-arm using a selectivity index. D, Left, Calcium transients of an example neuron that fired preferentially in the closed arm. The time spent in open arms is shown by gray bars. Right, The formula for calculating the true selectivity index (SI) of an individual neuron. E, Steps for determining the selectivity of an individual neuron. F, Left, Calcium events from the three example neurons aligned to arm occupancy: open-arm selective (top row), closed-arm selective (middle), and nonselective (bottom). Right, SI null distribution for each of these neurons obtained by computing SI values from shuffled data (n = 1,000 iterations; Materials and Methods). Red line: true SI value of the neuron.

  • Figure 2.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 2.

    Description of key parameters included in the investigation. A, Key parameters involved in each of the three major data processing stages from data collection to assessment of selectivity. Effects of preprocessing (Step I) on calcium data are shown in Extended Data Figure 2-1. B, Using a single coordinate to characterize the position of the mouse in the maze: head-centroid position versus body-centroid position. C, Nonbinned calcium transients (top) versus 1 s-binned calcium transients (bottom). The 1 s-binned calcium transients were obtained by averaging values in a moving 1 s window. D, Illustration of the types of neural data investigated in the current study. Raw Ca traces and Ca events were preprocessed and output directly from IDPS. Convolved Ca events were obtained by applying a convolution kernel to the Ca events. Ca traces analyzed in the current study referred to the low-pass-subtracted rectified Ca traces, which were obtained by subtracting the low-pass component from the raw Ca traces and rectifying them. E, Illustration of the number-matched method. The time spent in open arms is shown by the gray bars. The yellow bars refer to random subsets of closed-arm bouts. F, Representations of the procedures of the four shuffling methods.

  • Figure 3.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 3.

    Effects of parameters on label consistency and mechanisms of inconsistency. A, Pairwise label consistency matrix. A 120 × 120 matrix visualizing the effect of parameter settings on neuron selectivity labels (OA-selective, CA-selective, or nonselective). Label consistency: % of neurons assigned the same label by two parameter combinations. Note that randperm does not apply lawfully to raw traces, so eight combinations were excluded. We only show the top diagonal part of the matrix because it is symmetric. Bootstrap confidence intervals (CIs) are not shown here but are incorporated in B. B, Thresholded label consistency matrix (from A). Red shading (small effect, consistency values significantly >0.9); significance computed using bootstrap confidence intervals (CIs) for each matrix entry (Materials and Methods). The label consistency matrix with a threshold value of 0.8 is shown in Extended Data Figure 3-1A. C–G, Submatrices of parameter effects. Example pairwise label consistency submatrices illustrating the main effects of each parameter. Red shading (as in B), orange shading (medium effect, consistency values <0.9 but significantly >0.8), and yellow shading (large effect, consistency values not significantly >0.8); see Materials and Methods. More example submatrices are shown in Extended Data Figure 3-1B–F. H, Congruence matrix of computed SI between all pairs of parameter settings (120 × 120; right). Each entry represents whether the line fit to the scatter plot of SI values from that pair deviated significantly from 1 (bootstrap approach; Materials and Methods). Left, Two example best-fit lines, representing low (top) and high (bottom) true SI congruence. I, Congruence matrix of null SD values, similar to H. J, Matrix showing congruence of computed SI and null SD: merge of H and I, filtered by B. Black indicates parameter pairs with label consistency significantly >0.9. For the rest, green indicates low congruence of computed SI values, purple indicates low congruence of null SD values, and pink indicates low congruence for both metrics (see Materials and Methods). K, Percentage of each type of entry from the matrix shown in J.

  • Figure 4.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 4.

    Accuracy and robustness analysis of parameter settings. A, Template neuron examples. These neurons are from different mice. Left, Behavioral summary pie charts showing the percentage of time animals spent in OA and CA. Middle, Behavioral bouts and Ca events for an OA-selective template neuron are shown over time. To visualize patterns across behavioral bouts, OA/CA bouts and their associated Ca events were concatenated, ensuring that events occurring during OA (or CA) bouts remain grouped. Concatenated behavior bouts and Ca events are shown for all three example template neurons. Right, Proportion of Ca events occurring during OA versus CA bouts. B, Parameter settings accuracy. The percentage of template neurons correctly assigned to their selectivity labels for each parameter setting. A breakdown of the accuracy of assigning labels to each type of template neurons (OA-selective, CA-selective, nonselective) is shown in Extended Data Figure 4-1. C, Robustness calculation. Top, Procedure for calculating the average robustness of a specific parameter value, using calcium events as an example. Consistency values from Extended Data Figure 3A were used. Bottom, Calculation of combined robustness across all five parameter values. D, Combined robustness. Robustness scores for all parameter settings. E, Scatter plot of combined robustness versus accuracy. The red horizontal and vertical lines denote robustness (81.6) and accuracy (95) thresholds, respectively. Red dots: two (nearly overlapping) optimal parameter settings with the highest values of both accuracy and combined robustness. Blue dots: the next best settings behind the two optimal ones; they do not survive cross-validation (see text of Fig. 5).

  • Figure 5.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 5.

    Validation of the identified optimal parameter settings. A–C, Bootstrap validation. A, Schematic illustration of the bootstrapping validation procedure, showing a single iteration as an example (Materials and Methods). B, Left, Number of iterations identifying each parameter setting # as the first-optimal across 500 bootstrap iterations. Right, Probability of identifying either method 20 or method 21 as the first-optimal method across 500 bootstrap iterations. C, Left, Number of iterations identifying each parameter setting # as the second-optimal across 500 bootstrap iterations. Right, Probability of identifying either method 20 or method 21 as the second-optimal method across 500 bootstrap iterations. D–F, Holdout cross-validation. D, Left, Probability of identifying either method 20 or method 21 as the first-optimal method across 200 iterations using the training set (60% of the full data; Materials and Methods). Right, Probability of identifying either method 20 or method 21 as the second-optimal method across 200 iterations using the training set. E, Left, Probability of identifying either method 20 or method 21 as the first-optimal method across 200 iterations using the testing set (40% of the full data). Right, Probability of identifying either method 20 or method 21 as the second-optimal method across 200 iterations using the testing set. F, Distribution of correlations between training and testing datasets (200 iterations) of the ranking of all the parameter settings. The median rank correlation was 0.75.

  • Figure 6.
    • Download figure
    • Open in new tab
    • Download powerpoint
    Figure 6.

    Generality of optimal parameter settings across procedures for inferring encoding preferences of neurons. A, Left, Calcium transients of an example neuron. The time spent in open arms is shown by gray bars. Right, Schematic comparison of the SI approach, which uses average activity, and the GLM approach, which models instantaneous activity. Values of the calcium trace and behavioral regressor at two example time points (marked in orange and blue) illustrate the differences in input to each method. B, For the regression procedure, the initial data preprocessing steps are identical to those before (Fig. 2A), the data quantification parameters are identical save for the temporal binning parameter having levels that are more gradual (binned at sampling step, binned at 4 × sampling step = 100 ms), and the data analysis step of fitting a regression model involves the same parameters as above (Fig. 3A), with the addition of a link function parameter (with values of the identity function, or a log function). The statistical approach also uses a permutation test—comparing the actual value(s) of beta against a null distribution(s) obtained by randomly permuting associations. C, Selectivity label consistency, defined as the percentage of neurons assigned the same selectivity label under both the SI and GLM approaches, for the two optimal parameter settings identified via the SI approach. The two settings are additionally coupled with either an identity or a log link function when using the GLM approach.

Extended Data

  • Figures
  • Figure 2-1

    Effects of preprocessing on calcium data. (A) Key parameters in the data preprocessing stage and the standard range of choices for each parameter. (B) Procedure for inferring the overall effect of each preprocessing parameter on the output calcium data. (C) Median correlation coefficient between traces produced by methods using different parameters for spatial smoothing across all neurons. (D) Median correlation coefficient between events produced by methods using different parameters for event detection across all neurons. Download Figure 2-1, TIF file.

  • Figure 3-1

    Effects of parameters on label consistency, and mechanisms of inconsistency. (A) Thresholded label consistency matrix (from Fig. 3A). Orange shading (consistency values significantly greater than 0.8); significance computed using bootstrap confidence intervals (CIs) for each matrix entry (Methods). (B1-F1) Submatrices of parameter effects. Example pairwise label consistency submatrices illustrating the main effects of each parameter. Red shading (as in B), orange shading (medium effect, consistency values less than 0.9 but significantly greater than 0.8), and yellow shading (large effect, consistency values not significantly greater than 0.8); see Methods. (B2-F2) Pie charts summarizing parameter main effects and interaction effects between parameters. For C2-E2, pie charts visualize the distribution of consistency levels (red, orange, yellow) across all submatrices representing the parameter’s effect. For example, in the matched-nonmatched pie chart (E2), percentages of red/orange/yellow entries were calculated from 64 submatrices (squares) related to “effects of data-matching.” The dominance of orange entries indicates that matched and nonmatched generally had a medium effect across all conditions. Interaction effects. Pie charts also highlight interaction effects between parameters. In the absence of interactions, pie charts would display homogeneous colors (e.g., all red or orange). However, most pie charts demonstrate mixed colors, indicating significant interactions among parameters. For B2 and F2, the pie charts visualize the distribution of the main pattern (in B2, very low consistency between calcium traces and other neural data types, and high consistency among other pairs; in F2, very low consistency between randperm and partial ECM, and low consistency among other pairs) as well as variations within the main pattern. The presence of these variations indicates interaction effects between parameters. (B3) Example pairwise label consistency submatrices illustrating the interaction effects between parameters. (G) Matrix showing congruence of computed SI and null STD, filtered by Fig. 3B. Black indicates parameter pairs with label consistency not significantly greater than 0.9. For the rest, green indicates low congruence of computed SI values, purple indicates low congruence of null STD values, and pink indicates low congruence for both metrics (see Methods). (H-I) Boundary-zone exclusion. (H) (Left) Schematic illustrating the near-boundary regions relative to the four OA-CA boundary lines. (Right) Distribution of head-to-body center lengths (cm) across all frames from four mice. The median value was 4.04 cm. (I) Thresholded label consistency matrix (as in Fig. 3B) computed from boundary-excluded data. Red shading (consistency values significantly greater than 0.9); significance computed using bootstrap confidence intervals (CIs) for each matrix entry (Methods). Download Figure 3-1, TIF file.

  • Figure 4-1

    Accuracy and robustness analysis of parameter settings. (A) Breakdown of Fig. 4B (parameter settings accuracy) by template neuron type. For each parameter setting, the percentage of OA-selective, CA-selective, and non-selective template neurons that were correctly assigned to their respective selectivity labels is shown. Download Figure 4-1, TIF file.

Back to top

In this issue

eneuro: 13 (1)
eNeuro
Vol. 13, Issue 1
January 2026
  • Table of Contents
  • Index by author
  • Masthead (PDF)
Email

Thank you for sharing this eNeuro article.

NOTE: We request your email address only to inform the recipient that it was you who recommended this article, and that it is not junk mail. We do not retain these email addresses.

Enter multiple addresses on separate lines or separate them with commas.
Reliable Inference of the Encoding of Task States by Individual Neurons Using Calcium Imaging
(Your Name) has forwarded a page to you from eNeuro
(Your Name) thought you would be interested in this article in eNeuro.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Print
View Full Page PDF
Citation Tools
Reliable Inference of the Encoding of Task States by Individual Neurons Using Calcium Imaging
Huixin Huang, Garima Shah, Hita Adwanikar, Shreesh P. Mysore
eNeuro 20 January 2026, 13 (1) ENEURO.0378-25.2025; DOI: 10.1523/ENEURO.0378-25.2025

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
Respond to this article
Share
Reliable Inference of the Encoding of Task States by Individual Neurons Using Calcium Imaging
Huixin Huang, Garima Shah, Hita Adwanikar, Shreesh P. Mysore
eNeuro 20 January 2026, 13 (1) ENEURO.0378-25.2025; DOI: 10.1523/ENEURO.0378-25.2025
Twitter logo Facebook logo Mendeley logo
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Jump to section

  • Article
    • Abstract
    • Significance Statement
    • Introduction
    • Materials and Methods
    • Results
    • Discussion
    • Data availability
    • Footnotes
    • References
    • Synthesis
  • Figures & Data
  • Info & Metrics
  • eLetters
  • PDF

Keywords

  • calcium imaging
  • encoding
  • medial prefrontal cortex
  • neuron
  • selectivity
  • task states

Responses to this article

Respond to this article

Jump to comment:

No eLetters have been published for this article.

Related Articles

Cited By...

More in this TOC Section

Research Article: Methods/New Tools

  • Building an Ecosystem of Seizure Localization Methods: Neural Fragility as the First Step
  • Open-source platform for adjustable training regimes in freely moving and head-fixed mice
  • TriNet-MTL: A Multi-Branch Deep Learning Framework for Biometric Identification and Cognitive State Inference from Auditory-Evoked EEG
Show more Research Article: Methods/New Tools

Novel Tools and Methods

  • Representation Biases: Variance Is Not Always a Good Proxy for Importance
  • Building an Ecosystem of Seizure Localization Methods: Neural Fragility as the First Step
  • What Is My Neuron Doing? Commentary on Huang et al. (2026)
Show more Novel Tools and Methods

Subjects

  • Novel Tools and Methods
  • Home
  • Alerts
  • Follow SFN on BlueSky
  • Visit Society for Neuroscience on Facebook
  • Follow Society for Neuroscience on Twitter
  • Follow Society for Neuroscience on LinkedIn
  • Visit Society for Neuroscience on Youtube
  • Follow our RSS feeds

Content

  • Early Release
  • Current Issue
  • Latest Articles
  • Issue Archive
  • Blog
  • Browse by Topic

Information

  • For Authors
  • For the Media

About

  • About the Journal
  • Editorial Board
  • Privacy Notice
  • Contact
  • Feedback
(eNeuro logo)
(SfN logo)

Copyright © 2026 by the Society for Neuroscience.
eNeuro eISSN: 2373-2822

The ideas and opinions expressed in eNeuro do not necessarily reflect those of SfN or the eNeuro Editorial Board. Publication of an advertisement or other product mention in eNeuro should not be construed as an endorsement of the manufacturer’s claims. SfN does not assume any responsibility for any injury and/or damage to persons or property arising from or related to any use of any material contained in eNeuro.