Conceptio › Archive › NCBI PubMed Central
NCBI PubMed Central open access

A multimodal approach for visualizing and identifying electrophysiological cell types in vivo.

Lee EK et al. · ncbi_pmc
NCBI PubMed Central · Papers
Open Source ↗Direct PDF ↓
cognitive-psychology
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

A multimodal approach for visualizing and identifying electrophysiological cell types in vivo - PMC Skip to main content An official website of the United States government Here's how you know Here's how you know Search Log in Primary site navigation Search Log in Search PMC Full-Text Archive Search in PMC Journal List User Guide As a library, NLM provides access to scientific literature. Inclusion in an NLM database does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health. Learn more: PMC Disclaimer | PMC Copyright Notice Nat Commun . 2026 Apr 15;17:5241. doi: 10.1038/s41467-026-71331-0 A multimodal approach for visualizing and identifying electrophysiological cell types in vivo Eric Kenji Lee 1 , Asım E Gül 2 , Greggory Heller 3 , Anna Lakunina 4, 5, 6 , Han Yu 7, 8 , Andrew Shelton 6 , Shawn Olsen 6 , Nicholas A Steinmetz 9 , Cole Hurwitz 8 , Santiago Jaramillo 4, 5 , Pawel F Przytycki 10 , Chandramouli Chandrasekaran 1, 11, 12, 13, ✉ Author information Article notes Copyright and License information 1 Department of Psychological and Brain Sciences, Boston University, Boston, MA USA 2 Department of Psychology, Boğaziçi University, Beşiktaş, Istanbul Turkey 3 Department of Brain and Cognitive Sciences, Massachusetts Institute of Technology, Cambridge, MA USA 4 Department of Biology, University of Oregon, Eugene, OR USA 5 Institute of Neuroscience, University of Oregon, Eugene, OR USA 6 Allen Institute for Neural Dynamics, Seattle, WA USA 7 Department of Electrical Engineering, Columbia University, New York City, NY USA 8 Zuckerman Institute, Columbia University, New York City, NY USA 9 Department of Neurobiology and Biophysics, University of Washington, Seattle, WA USA 10 Faculty of Computing & Data Sciences, Boston University, Boston, MA USA 11 Center for Systems Neuroscience, Boston University, Boston, MA USA 12 Department of Biomedical Engineering, Boston University, Boston, MA USA 13 Department of Anatomy & Neurobiology, Boston University, Boston, MA USA ✉ Corresponding author. Received 2025 Sep 29; Accepted 2026 Mar 19; Collection date 2026. © The Author(s) 2026 Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ . PMC Copyright notice PMCID: PMC13260831  PMID: 41986318 Previous version available: This article is based on a previously available preprint posted on bioRxiv on July 31, 2025: " A multimodal approach for visualization and identification of electrophysiological cell types in vivo ". Abstract Neurons of different types perform diverse computations and coordinate their activity during sensation, perception, and action. While electrophysiological recordings can measure the activity of many neurons simultaneously, identifying cell types during these experiments remains difficult. Here we present PhysMAP, a framework adapted from multiomics data analysis that weights multiple electrophysiological modalities simultaneously to obtain interpretable multimodal representations. We apply PhysMAP to seven datasets and demonstrate that these multimodal representations are better aligned with known transcriptomically-defined cell types than any single modality alone. We then show that this alignment allows PhysMAP to better identify putative cell types in the absence of ground truth. We also demonstrate how annotated datasets can transfer labels to unannotated recordings and confirm that inferred cell types exhibit properties consistent with ground truth. Crucially, we show that PhysMAP can also be used to iteratively detect batch effects which confound classification. Together, these results establish PhysMAP as a tool for studying multiple cell types simultaneously and gaining insight into neural circuit dynamics. Subject terms: Machine learning, Computational neuroscience, Extracellular recording, Functional clustering In this study, the authors develop PhysMAP, which combines multiple electrophysiological features to identify neuronal cell types in the neural circuit, advancing the ability to investigate circuit dynamics without genetic or optical access during behavior. Introduction Single-cell transcriptomics, electrophysiology, and volumetric imaging have identified numerous groups of neurons defined by common gene expression, patterns of activity, and morphologies all broadly referred to as neuronal “cell types” in the brain 1 – 4 . These cell types form microcircuits to perform the neural computations that drive behavior 5 – 7 . For instance, in mice, interactions between excitatory pyramidal, parvalbumin-positive (PV + ), somatostatin-positive (SOM + ), and vasoactive intestinal peptide-positive (VIP + ) neurons enable computations, e.g., gain modulation 8 and selective enhancement of salient visual stimuli 9 . Despite these advances, most experiments can monitor only one or two cell types simultaneously; this precludes a full understanding of how cell types contribute to the brain’s many computations 10 . Current techniques are infeasible or technically challenging in species other than mice and in brain regions outside the neocortex owing to a lack of effective viral constructs 11 , 12 and limited optical access 13 – 15 . These constraints largely prevent the study of cortical cell types in non-human primates and humans (whose cortex is mostly too deep to access optically) and subcortical cell types in most animals. In contrast, high-density extracellular electrophysiological recordings can simultaneously sample from numerous neurons throughout the entire brain without requiring genetic or optical access 16 – 20 , including in humans 21 , 22 . Yet the cellular identities of recorded neurons remain largely invisible because the correspondence between cell types and their in vivo electrophysiological properties poorly understood. This fundamentally limits our understanding of circuit dynamics and how this relates to behavior. An analysis approach that delineates cell types within electrophysiological recordings would address this limitation. Such an approach should have the following capabilities: First, it should maximally incorporate electrophysiological information across multiple modalities to identify cell types. Potential modalities include waveform shape 23 – 26 , inter-spike interval (ISI) distributions 27 – 29 , autocorrelogram (ACG) 30 , and peri-stimulus time histograms (PSTHs) 31 – 33 which are all informative about cell type. However, which modalities to combine, how to best combine them, and under what conditions they are valid across experiments are not well understood. Second, “cell types” are not discrete, as they often lie along a continuum of function 34 . Thus, any approach to delineate cell types from electrophysiological data should be able to visualize and explore heterogeneity in an interpretable manner (e.g., how biological features vary within a cell type). Third, when cell type identity is available, representations should logically cluster according to ground truth, providing confidence that a similar structure can identify cell types in datasets lacking ground truth. Fourth, the approach should transfer labels from annotated to unannotated datasets (i.e., generalize) after detecting and addressing batch effects. Finally, any such method should excel at all these tasks with the computational efficiency needed for rapid iteration across modalities and datasets; this is because batch effects are ubiquitous and datasets often need to be iteratively refined until they align. Here we present “PhysMAP,” an approach satisfying all of these requirements. PhysMAP uses Seurat 35 and adapts advances in multimodal representation learning from computational biology 36 , 37 to electrophysiological data. PhysMAP combines non-linear dimensionality reduction 38 with a weighted-nearest neighbor graph (WNN) 35 , weighting multiple electrophysiological modalities on a per-unit basis to create an interpretable multimodal representation for unsupervised cell type identification. We apply PhysMAP to seven datasets from different neuroscience labs and show that it: (1) combines modalities and identifies cell types when ground truth is available, (2) explores and clusters putative cell types without annotations, (3) identifies cell types in partially-annotated datasets, (4) detects batch effects, and (5) runs on a personal computer in minutes. To demonstrate practical utility, we use a high-quality ground-truth dataset to identify cell types in a dataset with incomplete ground truth and assess the properties of several cell types interacting simultaneously during behavior. PhysMAP thus provides a versatile approach for identifying cell types in electrophysiological recordings, advancing our ability to study the circuit dynamics of multiple neuronal types during behavior. Results PhysMAP combines multiple electrophysiological modalities to uncover cell type and laminar structure Ex vivo experiments have shown that the relationship between cell type and electrophysiological signature spans multiple properties 2 , 39 , 40 , suggesting that cell types could be identified from in vivo extracellular recordings. We examined our first desired property of a multimodal tool: whether combining multiple electrophysiological modalities could better align with cell types than any single modality. PhysMAP unifies different modalities by combining high-dimensional UMAP (uniform manifold approximation and projection) graphs using a weighted nearest neighbor approach 35 across an arbitrary number of modalities 41 (see Supplementary Note 1 and Fig. S1 for details). We applied PhysMAP to in vivo juxtacellular recordings from the mouse somatosensory cortex, which provided low-noise somatic waveforms and ground truth cell type information ( n = 246) from eight cell types 32 . UMAP applied to waveform shape 25 , 42 produced 2D embeddings that aligned well with molecularly-defined cell types and laminar structure (Fig. 1 A), though some cell types (like layer 4 excitatory cells [E-4]) appeared split. In contrast, this split disappeared in the ISI modality (Fig. 1 B), but there was less clear delineation between PV + and SOM + cells. However, E-4 cells were well separated from E-5 (layer 5 excitatory cells) and other cell types. These complementary views suggest that optimally combining multiple modalities could provide more robust cell type delineation, as unsupervised multimodal approaches benefit when signals correlate across modalities while noise remains uncorrelated 43 . Fig. 1. Multimodal combination of physiological properties leads to structured representations that align with cell types. Open in a new tab A UMAP on normalized average waveform shapes of neurons ( n = 246) recorded in vivo juxtacellularly from mouse primary somatosensory cortex 32 . Each unit is colored according to one of eight ground truth cell types. Each modality was combined in different proportion according to the sum of each modality’s per-unit contribution to the total; this total contribution is listed as a percentage below each scatter plot. B UMAP on ISI distributions of the same neurons in A . C Each neuron in PhysMAP's WNN representation weighs each modality differently. These modal contributions are the sum of nearest neighbor edge modality weights ( β Modality in Fig. S1 J) and are shown in their proportion of the per-unit WNN weight (pie charts) or across all units (inset histogram). D PhysMAP's combined multimodal representation obtained using the WNN approach 35 . Again, each neuron is colored according to their ground truth cell type and layer. E Both modalities were concatenated into a single data vector per unit and passed into UMAP. This represents each modality in unweighted combination (as opposed to the WNN approach). Brain schematic in A adapted from ref. 105 , which is itself from the Allen Mouse Brain Atlas ( http://mouse.brain-map.org/ ). Source data are provided as a Source Data file. We examined how PhysMAP weights each modality per-neuron (Fig. 1 C). For most units, waveform shape was most informative (58% vs. 42% for waveform shape vs. ISI, respectively) which is also consistent with previous other studies 29 , though certain regions of the projection showed greater ISI importance. The multimodal representation obtained by weighting each modality per-neuron appeared to best separate cell types visually (Fig. 1 D). This visualization revealed that PV + cells cluster tightly and segregate by layer, while SOM + cells occupy a larger area, perhaps a result of physiological diversity 44 – 46 . To test whether PhysMAP’s improvements simply resulted from including more information, we applied UMAP to concatenated waveform shape and ISI features (unweighted combination of all modalities; Fig. 1 E). The resulting representation showed a perhaps weaker structure than PhysMAP (compare Fig. 1 E to Fig. 1 D), with poorer clustering of E-5, SOM + , and E-4 neurons. These results suggest PhysMAP’s weighted averaging approach better utilizes multiple modalities. We also replicated this analysis with three modalities by adding PSTHs aligned to whisker deflection (Fig. S2 A, B, and C, respectively). PSTH could also separate cell types, but was rarely the most informative modality for any units (Fig. S2 D). Again, the three-modality PhysMAP representation showed better clustering of PV + and E-4 cells visually (Fig. S2 E vs. Fig. 1 D) while the concatenated three-modality representation remained poorly clustered (Fig. S2 F), again reinforcing that naïve combination doesn’t improve representation quality. Since PSTH contributed minimally and its inclusion would preclude assessment of other functional properties due to analytic circularity 47 , we excluded it from subsequent analyses. These results show that PhysMAP satisfies the first requirement of an ideal tool: it can combine multiple modalities to obtain a representation that is superior to any single modality. Interpretable representations from PhysMAP enable biological insight Even when cell types have been identified through optotagging, they often encompass multiple subclasses 44 ; physiological variation within a class is the norm 34 . Thus, a second requirement is the ability to visualize physiological diversity within and across defined types. PhysMAP’s visualizations fulfill this requirement. Figure 2 A shows the PhysMAP plot from Fig. 1 D with marker radius scaled to reflect waveform spike width, peak-to-trough ratio, and onset latency. Examining spike width (Fig. 2 A, left), clear patterns emerge: PV + cells are uniformly narrow regardless of layer; SOM + cells span a gradient of widths overlapping with E-5 cells at their widest; and E-4 cells have the widest spikes. This heterogeneity in SOM + cells likely reflects several subtypes with varying widths 48 and distinct computational roles 45 . Waveform peak-to-trough ratios also differ between cell types (Fig. 2 A, center) with PV + and SOM + cells having the smallest ratios and both E-4 and E-5 cells occupying the largest ratios. Firing rate onset latency (Fig. 2 A, right) is shortest for PV + cells and longest for SOM + cells, consistent with ref. 32 . Fig. 2. PhysMAP identifies cell types from juxtacellular recordings better than any modality alone. Open in a new tab A Juxtacellular single unit recordings ( n = 246) from mouse primary somatosensory cortex were collected under two modalities: juxtacellular waveform shape and inter-spike interval distribution in response to whisker deflection. Shown are two-dimensional PhysMAP visualizations of these units. Each unit is colored according to its ground truth cell type as deduced by optogenetic tagging in addition to layer information. The spike width (time from peak to trough), peak-to-trough ratio (ratio of trough and peak absolute amplitude), and spiking onset latency (trial-averaged time to half-peak in firing rate) for each neuron. Marker sizes shown are proportional in area to the log of the scalar value. B The PhysMAP projection of neurons with their ground truth cell type and layer (left) next to an example Leiden clustering 100 with resolution parameter set to 2 (right). C Leiden clustering is applied to the UMAP graphs of each modality alone (waveform [WF] or ISI dist. [ISI]), unweighted combination (concat.), or in weighted (PhysMAP) and shown with the associated modified adjusted Rand index (MARI 50 ) across a range of resolution parameter values. Arrow marker indicates the clustering on PhysMAP used above in B . Waveform metrics and “raw data” (i.e., without constructing a UMAP graph) were omitted because these do not yield a high-dimensional UMAP graph. D Each of the Leiden clusters located in B are shown broken down into their constituent cell types. Outer ring color indicates the weight of each constituent modality and inner pie chart denotes the relative proportions of ground truth cell types within said cluster. Number at top right of each indicates the cluster in ( B , right) each corresponds to. E Each of the Leiden clusters in ( B , right) and D are shown with their respective normalized and smoothed peri-stimulus time histograms aligned to a whisker deflection ("touch” stimulus). Also labeled are the firing rate peak times of several Leiden clusters relative to the stimulus (dashed lines). F A gradient boosted tree model (GBM) classifier was trained on this multimodal data with 5-fold cross-validation on each modality’s UMAP graph individually or on the multimodal WNN graph. The same classifier was also trained directly on the “raw data” (that is, without constructing a UMAP graph and projecting it; black line). The balanced accuracy performance of this classifier (mean ± S.E.M.) on held-out data for each modality or the combined modalities for the five cell type classes with over 10 samples (units) each. This contained n = 19, 58, 69, 44, and 19 cells of PV + -4, E-4, SOM + , E-5, and PV + -5, respectively. Brain schematic in A adapted from 105 , which is itself from the Allen Mouse Brain Atlas ( http://mouse.brain-map.org/ ). Source data are provided as a Source Data file. These interpretations also held when the trial-averaged firing rate response to a whisker deflection (PSTH) was included (Fig. S5 A). We note that PSTH was excluded here to avoid analytic circularity 47 as, in the next section, we examine the PSTH of each unsupervised cluster. These insights are not apparent when examining metrics without the PhysMAP representation. A scatter plot of spike width versus peak-to-trough ratio (Fig. S3 ) shows some structure but appears as one continuous relationship, failing to clearly separate SOM + , PV + , and excitatory cells. Histograms of these metrics show considerable overlap between cell types (Fig. S3 B). Thus, PhysMAP satisfies the second property of an ideal tool as it provides an interpretable visualization that effectively combines multimodal electrophysiological data, facilitating exploration of physiological diversity while maintaining the relationship to molecularly-defined cell types. Combining multiple modalities improves unsupervised clustering Annotations are often unavailable, as in electrophysiological datasets without optotagging. In such cases, it is desirable to uncover cell types via unsupervised methods 1 , 2 , 21 , 23 , 24 , 26 , 29 , 49 . Thus, a third requirement is that unsupervised clustering should align with ground truth cell types. To do this, we evaluated whether PhysMAP representations align with molecularly-defined cell types in a fully unsupervised analysis, asking the question: “without access to ground truth, how well do unsupervised methods identify cell types?” We assessed PhysMAP-to-ground-truth alignment using the modified adjusted Rand index (MARI 50 ) to estimate if ground truth cell types align with individual unsupervised clusters. We applied Leiden clustering to the high-dimensional graphs produced by PhysMAP and each individual modality and then calculated MARI scores between clustering results and ground truth labels across a range of resolution parameters (cluster size priors; see “Methods: MARI calculation” for details). Figure 2 B shows neurons in PhysMAP colored by cell type (left) alongside a sample Leiden clustering with resolution set to 2 (right) which produced the same number of clusters as prominent cell types (greater than 10 samples). PhysMAP produced higher MARI scores than any individual modality or all modalities in unweighted combination across all Leiden resolutions (Fig. 2 C), indicating superior unsupervised capture of cell type structures at all levels of granularity (see Fig. S4 A for clustering at other resolutions). This result also held when PSTH was included as a modality and was not sensitive to changing the neighborhood size used by UMAP (Fig. S4 B). When we set the resolution to 2 (the maximum value before MARI dropped), six clusters were produced with varying proportions of cell types within each (Fig. 2 D). We found that while not all clusters captured single cell types, many showed high specificity: E-4 cells dominated cluster 1, PV + cells (especially PV-4) dominated cluster 2, and SOM + cells were substantially represented in cluster 4. With PSTH included, clusters were also similar in composition to the two-modality case, presumably because PSTH contributed little to overall clustering (Fig. S5 C). To confirm this advantage was not a peculiar feature of Leiden clustering, we also applied a Gaussian mixture model (GMM) to both individual modalities and their unweighted concatenation (Fig. S5 G). The GMM was applied to either a 30-dimensional PC space for individual modalities or the 30-dimensional multimodal embedding for PhysMAP. Across all comparisons, PhysMAP’s weighted multimodal representation achieved higher MARI scores than GMM clustering on individual modalities or unweighted combinations, indicating better capture of underlying ground truth cell types. To assess the functional properties of these unsupervised clusters, we examined their responses to whisker deflection stimuli (Fig. 2 E). Several notable features aligned with previous findings in the literature: cluster 2 (predominantly PV + ) showed large, low-latency (peak at 7 ms) firing rate increases, matching properties of PV + cells reported by ref. 32 ; cluster 1 (predominantly E-4) responded with similar latency but much smaller firing rate changes consistent with excitatory cells receiving direct thalamo-cortical input; and cluster 3 (containing many SOM + cells) was the slowest responding (peak at 16 ms), consistent with previous characterizations of SOM + cells. While SOM + cells were split among several clusters, this is unsurprising given their diversity 44 , 45 . Traditional waveform metrics similarly struggled to cluster SOM + cells, as shown by their distribution split across separate GMM clusters (Fig. S3 B, C). These results show that PhysMAP has another property desired of an ideal tool—provide unsupervised clustering methods an excellent opportunity to capture molecularly-defined cell types, even when annotations are unavailable. PhysMAP delineates cell types better than any modality alone or in unweighted combination The previous section showed that PhysMAP’s multimodal representations align better with molecularly-defined cell types from an unsupervised perspective. However, there are also datasets that contain cell type information; do these representations continue to identify these cell types, as assessed by a classifier trained on PhysMAP’s structure? We now examine whether these advantages persist in a supervised analysis by training a classification algorithm on PhysMAP’s representation and to assess whether it outperformed other classifiers trained on individual modalities or in unweighted combinations. In this way, we examine PhysMAP’s performance on datasets that either completely lack ground truth (as in the previous section) or are fully characterized. We trained classifiers on high-dimensional graphs to identify cell types using individual modality representations, unweighted concatenation, and PhysMAP. For comparison, we also trained classifiers on derived electrophysiological metrics and raw data without dimensionality reduction. Using a 85–15% train-test split, we trained gradient-boosted tree models (GBM) with fivefold cross-validation on high-dimensional embeddings to identify the five cell types with over 10 examples each (so that at least one data point from each class could be included in the test set; see Methods: Classifier Analysis for details). PhysMAP matched or exceeded the performance of all other modalities, whether individual or in unweighted combination, across all cell types (Fig. 2 F). Waveform shape performed nearly as well as PhysMAP for PV-4, E-4, and SOM + cells, confirming our hypothesis that waveform shape is the most cell-type-informative modality (Fig. 1 C) and validating our previous findings with WaveMAP 24 , 25 . The benefit of additional modalities was most evident in improved classification of E-5 and PV-5 neurons. PhysMAP also demonstrated better classification performance than the modalities in an unweighted combination (concatenated) for all cell types (Fig. S5 E, teal line). PhysMAP and waveform shape far outperformed traditional derived waveform metrics (spike width and peak-to-trough ratio; Fig. S5 E, gray dashed line), confirming that hand-derived metrics lose important cell type-distinguishing information. Notably, PhysMAP matched or performed better than classifiers trained on raw data, despite the dimensionality reduction step: the GBM classifier trained directly on full-dimensional data from all modalities underperformed both PhysMAP and waveform shape alone (Fig. 2 C, black dashed line). While seemingly counterintuitive, this reflects how dimensionality reduction helps “denoise” latent clusters in smaller datasets. Moreover, training directly on raw data sacrifices interpretability, providing only class labels and probabilities without the visualization benefits of PhysMAP. These results were robust to choices of input dimensionality and classifier type. Classification accuracy patterns remained consistent across embedding dimensions from high (50-dim.) down to low (5-dim.; Fig. S6 A) and across classifier types (Fig. S6 B). This preservation of performance trends is likely because the input modalities are low-dimensional. Principal component analysis showed that the intrinsic dimensionality of each dataset was relatively low, with “elbows” in the scree plots at the third, sixth, and third PCs representing 91%, 90%, and 93% of total variance for waveform shape, ISI distribution, and PSTH, respectively (Fig. S7 ). Thus, PhysMAP satisfies our third property of an ideal cell type identification tool as it intelligently combines multiple modalities to draw out cell type structure better than any modality alone or in unweighted combination, while providing valuable visualizations for exploring physiological diversity and maintaining high classification performance. PhysMAP identifies cell types in extracellular electrophysiological recordings The juxtacellular recordings analyzed above represent an ideal scenario: unattenuated somatic waveforms, unambiguous single-unit isolation, and preferential targeting of specific cell types. We next asked whether PhysMAP could identify cell types in extracellular probe recordings, which introduce challenges including low-pass signal filtering by neuropil, poorer single-unit isolation, and non-somatic waveforms—all contributing to increased ambiguity in cell type properties. We analyzed an extracellular dataset from the mouse primary auditory cortex with optotagged cells. In this study, researchers recorded from neurons in the mouse primary auditory cortex ( n = 373) with extracellular probes while mice were presented with auditory stimuli. They identified both SOM + and PV + units via optogenetic tagging and recorded each unit’s waveform shape and ISI distribution. When PhysMAP was applied to this data, visualization shows a clear separation of both SOM + and PV + cell types (purple and teal, respectively) from untagged, presumably excitatory cells (gray; Fig. 3 A). Fig. 3. PhysMAP identifies cell types in extracellular recordings. Open in a new tab A PhysMAP applied to putative single unit ( n = 373) extracellular recordings from mouse auditory cortex 95 using silicon multi-channel probes. We used waveform shape and ISI distribution as our modalities and neurons are colored according to cell type whose identities were obtained via optogenetic tagging. Marker size is set according to the increase in spike rate from optogenetic stimulation relative to baseline. Highlighted are a population of wide-spiking SOM + cells (top) and narrow-spiking SOM + cells (right). Excitatory cells were only inferred as they were not directly tagged. A, inset A GBM classifier with fivefold cross-validation was trained on the 10-dimensional graph of each modality or PhysMAP. The classifier was also trained directly on the raw (un-dimensionality reduced) multimodal data ( n = 373) or simply waveform spike width to identify each optotagged cell type or untagged label ( n = 8, 32, 45, and 288 of each excitatory, PV + , SOM + , and untagged, respectively). The balanced classification accuracy is shown (mean ± S.E.M.) with many error bars smaller than marker size. B Normalized average waveforms in this dataset are passed into UMAP and their projection shown with optotagged cells colored and degree of optogenetic modulation (average change in spikes/s during stimulation epochs) shown by marker size. C Similarly, ISI distributions for these same neurons are also passed into UMAP and their projection shown. D Gaussian kernel probability density estimates for the distribution of each optotagged type across a range of spike widths is shown both as a histogram and with a kernel density estimator (solid line and shaded region). E Additionally, spike width is shown for all cells, including untagged ones. Source data are provided as a Source Data file. We quantified this separation by training a classifier to identify each cell type using PhysMAP and compared it against classifiers trained on individual modalities or waveform metrics. PhysMAP outperformed ISI distributions and spike metrics but matched the performance of waveform shape or raw data for PV + , SOM + , and undefined (presumably excitatory) cells (Fig. 3 B). This equivalence to waveform shape likely occurs because this modality is highly informative of molecularly-defined cell types, with median per-unit weights of 0.71 for waveform shape versus 0.29 for ISI distribution. This is a demonstration of PhysMAP’s ability to focus only on informative modalities; and this prioritization of waveform shape is evident in the visualizations: PhysMAP’s projection closely resembles the waveform shape visualization (Fig. 3 B), while the same for ISI distribution shows far less structure (Fig. 3 C). The PhysMAP approach also revealed interpretable cell type heterogeneity. We identified two sub-populations of SOM + cells not documented in the original study: wide-spiking SOM + (WS-SOM + , Fig. 3 A, left) and narrow-spiking SOM + (NS-SOM + , Fig. 3 A, lower right) cells, which occupied separate regions of the embedding. These sub-populations align with previous observations of SOM + subtypes with specific synaptic targeting 45 and differential behavioral functions 51 , 52 . Importantly, these SOM + sub-populations would be difficult to identify using spike width alone, as SOM + cells as a whole form a continuum on this metric (Fig. 3 D, purple) that overlaps with both PV + cells (Fig. 3 D, teal) and numerous untagged cells, presumably including excitatory neurons (Fig. 3 E). PhysMAP’s multimodal approach disambiguates these SOM + subtypes while simultaneously distinguishing PV + and inferred excitatory cells. This ability to optimally identify molecularly-defined cell types extracellularly also held for a separate heterogeneous dataset from CellExplorer 53 , spanning multiple brain areas. Here, the multimodal approach again separated cell types better than unimodal visualizations (Fig. S8 A–E) and demonstrated superior performance from both supervised classification (Fig. S8 F) and unsupervised clustering perspectives (Fig. S8 G). These results establish that PhysMAP can identify cell types in extracellular recordings by effectively leveraging informative modalities while discounting less reliable ones. PhysMAP identifies inhibitory cell types with accuracy greater than or equal to other unsupervised methods Targeted optogenetic experiments like those in the previous section offer ideal conditions for cell type identification: during recordings, single electrodes are advanced until optically-responsive cells are found and isolated. However, in most electrophysiological recordings, electrodes take an unbiased sampling of all neurons. Typical recordings also capture neurons with poorer isolation, at variable distances to somata, and more variable light intensities than targeted tagging experiments. Cell identification in such settings faces additional challenges: opsin-expressing cells can show diverse responses to light stimulation, including “paradoxical suppression” 54 , and non-expressing cells may also show excitation due to polysynaptic effects. In order to demonstrate whether or not PhysMAP satisfies the fourth property of an ideal tool (identifying cell types in real use cases), we must first examine how it performs when optotagged cells aren’t specifically searched for and enriched within a dataset. We demonstrate that despite these challenges, PhysMAP outperforms single modalities and other unsupervised methods in identifying cell type structures without optogenetic targeting, while requiring less computation time and no architecture tuning. We applied PhysMAP to a large dataset of optotagged inhibitory neurons collected using Neuropixels Ultra probes from mouse visual cortex 55 , containing waveforms and 3D-autocorrelograms (3D-ACGs) from 8953 putative single units including 237 PV + , 107 SOM + , and 118 VIP + cells. PhysMAP’s embedding (Fig. 4 A, top left) clearly separated PV + cells (teal) from SOM + cells (purple), while VIP + cells (pink) were scattered among untagged broad-spiking (presumably excitatory) cells (gray). In contrast, the 3D-ACG visualization showed poor clustering (Fig. 4 A, top right) but waveform shape clustering was ostensibly comparable (Fig. 4 A, bottom). Fig. 4. PhysMAP outperforms single-modality approaches and deep learning methods for inhibitory cell type identification. Open in a new tab A UMAP visualizations of mouse V1 neurons ( n = 8953) recorded with Neuropixels Ultra probes, shown using different dimensionality reduction methods: PhysMAP multimodal integration (top left), UMAP on 3D-autocorrelograms alone (top right), and UMAP on waveforms alone (WaveMAP, bottom). Cells are color-coded by optogenetic tagging: PV + (teal), SOM + (purple), VIP + (red), and untagged cells (gray). B Confusion matrices comparing classification performance of a GBM (raw accuracy) trained on the high-dimensional representations (all matched at 60 dims.) across three approaches: PhysMAP (top left), 3D-ACG UMAP (top right), and waveform UMAP/WaveMAP (bottom left). A multi-layer perceptron was used to classify cell types from the latent embedding of a pair of β -variational autoencoders (bottom right). Values represent the percentage of cells from each true cell type (rows) assigned to each predicted type (columns). Color intensity corresponds to classification accuracy. Highest true positive percentages per cell type across all approaches are highlighted by embossing. Brain schematic in A adapted from ref. 105 , which is itself from the Allen Mouse Brain Atlas ( http://mouse.brain-map.org/ ). Source data are provided as a Source Data file. A GBM classifier trained on PhysMAP’s multimodal representation outperformed both unimodal representations of 3D-ACG and waveform shape across all three optotagged cell types (Fig. 4 B; p < 0.001 and p = 0.016, respectively, two-sided Friedman test). PhysMAP also outperformed classifiers trained directly on the raw data for most cell types (80%, 64%, and 71% for PV + , SOM + , and VIP + , respectively; p < 0.001, two-sided Friedman test), demonstrating that its cell type-informative structure isn’t merely an artifact of optogenetic targeting and enrichment in the dataset. We also compared our approach against a β -variational autoencoder (VAE) method, representative of current unsupervised deep learning approaches. Although the VAE successfully reconstructed both waveform shapes and 3D-ACGs (Fig. S9 A, B) and produced sensible embedding structures (Fig. S9 C), a classifier trained on this embedding failed to outperform the GBM classifier trained on PhysMAP (Fig. 4 B, bottom right; p < 0.001, two-sided Friedman test). It is important to note that we used a single VAE architecture trained for each modality separately (Fig. S10 ), in contrast to extant ensemble approaches with multiple VAEs 30 , 56 , as the latter would be computationally infeasible to compare. Furthermore, although these alternative identification approaches are powerful (however, compare Fig. S11 B, left to Supp. Fig. 6 G of ref. 30 ), they are not ideal for the use case we intend for PhysMAP of being an iterable tool to quickly explore different datasets across several modalities: the ensemble approach would have entailed training ten separate models for each unit in the dataset. PhysMAP is computationally more efficient: The β -VAE pair required a high-performance GPU (NVIDIA L40S GPU; 500 epochs, 81 dimensions; 3.2 min) to achieve comparable training times to PhysMAP on a laptop (Apple M2 CPU; 500 epochs, 81 dimensions; 3.0 min), this while still at inferior performance. Thus, PhysMAP provides superior multimodal representations with significantly less computational overhead compared to deep learning methods, making it ideally suited to data exploration and iteration across many modalities and datasets. Multimodal visualization identifies batch effects We have demonstrated that PhysMAP can uncover cell types within single datasets. However, for experimental utility, PhysMAP must consistently identify cell types across different animals and conditions. In real-world use cases, distributional shifts between datasets can alter the relationship between cell type and electrophysiological properties, impeding transfer learning. These shifts most commonly arise from lab-specific differences in data processing or experimental procedures 57 . Critically, different modalities may be differentially affected: different signal processing filters can alter waveform shape while preserving spike timing patterns (see Fig. 5 of ref. 42 ); conversely, when comparing recordings from two behavioral paradigms, waveform shape may be conserved while spike timing statistics change. Fig. 5. PhysMAP provides batch effect detection within and between modalities. Open in a new tab A Two mouse visual cortex datasets visualized using PhysMAP: the Visual Behavior dataset (VB, green, recorded with Neuropixels 1.0; n = 5582) and the Ultras dataset (Ultras, yellow, recorded with Neuropixels Ultra; n = 8953). Diagrams show probe placements for each experiment. Waveform shape and 3D-autocorrelogam (3D-ACG) are combined in PhysMAP and experiments are shown in the same visualization. B Constituent modality-specific UMAP projections with waveform shape (top) and 3D-ACG modality (bottom). Units are again colored according to originating experiment (green for Ultras; yellow for VB). The horizontal dashed line is to make clear to the reader that top and bottom are part of different modalities and projections. C PhysMAP projection of waveform shape and 3D-autocorrelogram from two subsets (different animals) of VB experiments, one containing an image/animal subset H (in red) and another an image/animal subset G (in blue). D The VB multimodal representation is split into its constituent modalities. This consists of waveform shape (left) and 3D-ACG (right). Brain schematics in A adapted from ref. 105 , which is itself from the Allen Mouse Brain Atlas ( http://mouse.brain-map.org/ ). Source data are provided as a Source Data file. The danger of batch effects for cell type identification arises when a classifier is applied to data in which the feature-label relationship differs from that in the training data. This danger increases with classifiers that output predictions without exposing underlying distributional alignments. Thus, any cell type identification tool must detect batch effects and assess which modalities to include 58 , 59 . PhysMAP’s multimodal visualization provides exactly this capability. We encountered the danger of batch effects in ACG firsthand: anchor alignment 60 (used in a previous iteration of PhysMAP) dramatically reduced classification accuracy by introducing random distributional shifts in noisy modalities (in this case, ACG; Fig. S11 A). These effects reduced classifier performance by, on average, 22% across the three cell types investigated. This negative effect also appeared when PhysMAP was applied to cerebellar cell types (Fig. S11 B 30 , 61 ). Batch effects can be equally dangerous for waveform shape. To demonstrate this, we took half of the Ultras dataset and filtered the waveforms with either a 250 Hz or 500 Hz high-pass 4th-order Butterworth filter. Visualizing this modality with PhysMAP at the 250 Hz cutoff, we easily observed the presence of a batch effect as shown in the “mirroring” of broad- and some narrow-spiking waveforms (Fig. S12 A). While the waveforms split according to cell type were nearly identical before and after filtration (Fig. S12 B), a classifier trained on the unfiltered waveforms but tested on the filtered ones failed to correctly classify nearly any VIP + cells (Fig. S12 C): the classifier falsely identified nearly every VIP + cell as a SOM + cell. The deleterious effect on classification increased with a higher cutoff frequency and commensurately larger batch effect. Visualizing the waveforms filtered at the 500  Hz cutoff, the two sets of waveforms were completely separated (Fig. S12 D). Again, although the waveforms themselves did not appear much different (Fig. S12 E), classification performance was reduced by 10 to 15% for PV + and SOM + cell types. The classifier for VIP + cells again failed entirely. The preceding examples used controlled manipulations to demonstrate how batch effects corrupt classification. In practice, however, batch effects are usually not known ahead of time, and thus the challenge is in identifying which modalities are affected when combining independently collected datasets. To demonstrate PhysMAP’s ability to diagnose batch effects and assess modalities for inclusion, we examined two independently collected large-scale datasets: the previously investigated Ultras dataset and the Visual Behavior (VB) dataset 62 . To assess distributional alignment between these two datasets, we jointly projected them into PhysMAP’s multimodal embedding using normalized waveform shape and 3D-ACG (Fig. 5 A), color-coding by dataset (Ultras in green, VB in yellow). While some units overlapped (gold units within the green cluster at upper left), most were completely separable—a batch effect made visible by PhysMAP’s unsupervised approach. Examining individual modalities (Fig. 5 B), waveform shapes largely coincided between datasets (Fig. 5 B, top), with minor differences: Ultras waveforms concentrated at relative to VB, and some Ultras units formed a separate cluster (middle right) composed of triphasic waveforms. These waveforms consisted of large pre-hyperpolarization peaks—likely waveforms from neurites that are visible only on very high-density probes 55 . In contrast, 3D-ACGs showed complete separation between datasets (Fig. 5 B, bottom), likely because Ultras ACGs contained no spikes at certain timescales due to masking during optotagging stimulation. Although both datasets used matched window and bin sizes for ACG calculation, and the VB dataset excluded spike times from during the optotagging epochs, other sources of batch effects may have persisted. For instance, the stimulus presentation pattern and frequency in the VB dataset may have systematically influenced spike timing patterns in ways absent from the Ultras dataset that lacked stimuli. Similarly, in the Ultras dataset, the lack of long contiguous activity periods meant that spikes were drawn from inter-trial intervals; in addition, the optotagging stimulation may have induced longer timescale effects persisting into the inter-trial epoch via second-order effects 54 . Ideally, both experiments would contain either spikes from a “spontaneous activity” period or spikes collected during matched visual stimuli to enable integration, a point we return to in the Discussion. This real-world use case underscores that batch effects in spike timing modalities can arise from differences in experimental design but can be detected by PhysMAP. Thus, PhysMAP’s visualization-first approach represents a key advantage over purely classifier-based approaches that would have failed silently and led to erroneous conclusions within downstream analyses. Note, while this dataset may have been reduced to just one modality, we do not mean to imply that any two experiments will not align on modalities such as 3D-ACG. The VB dataset is itself also divided into two experiments, each following the same protocol but using different natural image sets and animals. These two datasets were indistinguishable both in the multimodal embedding space (Fig. 5 C) and within each individual constituent modality (Fig. 5 D). We emphasize that there are no extant datasets known to us with high-quality optotagging of all major inhibitory cell types during behavior, so while our analysis reduces to the unimodal case when examining the VB and Ultras datasets, it is an example of PhysMAP’s graceful handling of inappropriate modalities that would have instead failed silently if a purely classifier approach had been taken. PhysMAP can infer cell types using reference datasets Guided by the previous section, we used waveform shape alone and visualized cells by optotagged identity. While most PV + and SOM + units occupied halves of one narrow-spiking cluster (Fig. 6 A, lower right), numerous SOM + and VIP + cells were scattered throughout the larger cluster of wide-spiking excitatory cell types. The vast majority of neurons and cell types remain untagged since experimentalists can typically label only a few cell types, leaving most uncharacterized. This experimental constraint creates variable confidence across the neural population: regions with many tagged cells offer high classification confidence, whereas sparsely labeled regions remain uncharacterized (the “open-world problem” in machine learning 63 ). Yet nearly all previous cell type identification methods train on datasets containing only labeled cells, assigning labels uniformly without considering out-of-distribution cell types or varying confidence based on local ground truth density. What is needed is an identification approach that acknowledges incomplete knowledge and identifies cell types only where sufficient evidence exists. We address this need by creating a classifier that uses local densities of ground truth information exposed by PhysMAP. Fig. 6. PhysMAP enables cross-dataset cell type identification through modality assessment and label transfer. Open in a new tab A Cell type ground truth labels in the combined (VB+Ultras) dataset, visualized using PhysMAP on waveform shape. Optotagged inhibitory interneurons are color-coded: PV + (teal), SOM + (purple), and VIP + (red) cells, with untagged cells in gray. B Inferred SOM + cells in the VB dataset (pink circles) based on nearest-neighbor label transfer with ground truth SOM + cells from the Ultras dataset with waveform shapes shown (pink in inset) on a background of all waveforms in the VB dataset (gray in inset). C Inferred PV + cells in the VB dataset (green circles) using the same approach also with waveform shapes shown (green in inset) on a background of all waveforms in the VB dataset (gray in inset). Source data are provided as a Source Data file. We built a nearest-neighbor classifier based on the amount of ground truth labels surrounding every untagged neuron in PhysMAP’s representation. For each untagged VB unit, we calculated the proportion of nearest neighbors from the Ultras dataset belonging to each labeled cell type (including other untagged cells) on the multimodal graph constructed by PhysMAP (Fig. S1 J). This approach reduces the number of identified neurons but increases accuracy and avoids low-confidence regions (presumably composed of uncharacterized cell types). Based on this tradeoff (Fig. S13 ), we determined thresholds of 20% for nearest PV + and 7.5% for nearest SOM + neighbors, yielding 63 PV + and 62 SOM + units with 95% and 67% accuracy, respectively, all localizing to the narrow-spiking cluster shown by Fig. 6 B and Fig. 6 C, respectively. Note that some of these classification accuracies are higher than in Fig. 4 B because the selection of ground truth nearest neighbors acts as a “confidence threshold” 30 . As the proportion of ground truth neighbors increases, the accuracy of identification remains either roughly constant (SOM + ) or monotonically increases (PV + ) except when the number of untagged cells with a certain ground truth neighbor proportion reaches zero. As expected, inferred SOM + cells aggregated strongly in SOM + -labeled areas and showed intermediate to narrow waveform widths matching ground truth SOM + cells from previous analyses in this work. Similarly, inferred PV + cells were more common in regions surrounded by Ultras PV + cells and showed narrow waveforms consistent with known PV + properties. Thus, while we only identified a subset of these inhibitory neurons, we did so with higher confidence than possible from a simple classifier. PhysMAP’s visualization-first approach allows direct assessment of where and why units are classified, building trust through transparency rather than relying solely on blind predictions from classifiers trained on datasets potentially containing batch effects. Inferred types from PhysMAP match ground truth properties In the previous section, we inferred PV + and SOM + cells by projecting VB and Ultras datasets into a shared multimodal representation and then using Ultras ground truth to predict cell types in VB. But do the properties of the inferred cells in VB match known properties of these cell types? To determine this, we examined the properties of these inferred PV + and SOM + cells. Inferred PV + cells exhibited vigorous, low-latency stimulus responses to the onset and offset of full-field flashes and also showed spike frequency spectra peaks in the gamma frequency band (Fig. 7 A). These are known characteristics of these types of interneuron 31 , 32 , 64 – 66 . In contrast, inferred SOM + cells (Fig. 7 B) displayed lower maximum firing rates, suppressed or delayed responses to stimuli, and more variable responses than PV + cells, matching previous findings 31 , 67 , 68 . Furthermore, their spike spectra showed peaks at lower frequencies consistent with their role in driving visually induced oscillations at lower LFP frequencies (<30 Hz) 66 . These cell type-specific patterns were largely consistent across all cells of each inferred type, with PV + cells showing strong responses to the onset and offset of stimuli (Fig. 7 C) whereas SOM + cells were more variable and sustained in response (Fig. 7 D). Fig. 7. Label transfer allows inference of PV + and SOM + cell types in unannotated datasets. Open in a new tab A Simultaneous raster plots in response to a dark full-field flash (top), smoothed trial-averaged mean firing rates (spikes/s with SEM and 100 ms time bin Gaussian smoothing; middle), and autocorrelograms (ACG; bottom) for a simultaneously recorded inferred PV + cell in visual areas VISal (green). Black overbar or vertical dashed lines indicate stimulus onset and offset times. Each raster’s row is a simultaneous trial shared by all cells. B Simultaneously inferred SOM + cell in VISpm (pink, contemporaneously recorded with the PV + neuron in A ) also with rasters, smoothed trial-averaged firing rates, and ACGs (top, middle [mean spikes/s with SEM and 100 ms time bin Gaussian smoothing], and bottom respectively). C PSTHs (mean normalized spikes/s with SEM) for all inferred PV + units (across experiments). D PSTHs (mean normalized spikes/s with SEM) for inferred SOM + neurons. Each trace consists of binned spike times (1 ms, non-overlapping bins) and is normalized by the maximum trial-averaged firing rate for that unit. Source data are provided as a Source Data file. Collectively, inferred PV + and SOM + cells match their expected physiological properties in vivo. These results provide compelling evidence that PhysMAP can leverage ground truth datasets to enable the identification of cell types in datasets where ground truth is not available. Case study: using PhysMAP to identify microcircuits in vivo Currently, technical limitations mean that circuit dynamics are inferred by examining only single cell types at a time. However, neural computation is not the product of cell types operating in isolation but instead emerges from the interactions between different cells 69 . Having established that PhysMAP can identify several cell types simultaneously during behavior, we now demonstrate how this capability can be extended to the identification of microcircuits in vivo. To demonstrate PhysMAP’s ability to identify microcircuits during behavior, we examined the relationships between PV + , SOM + , cells and directly optotagged VIP + cells all simultaneously within the same experiment (Fig. 8 A 70 , 71 ). Note that since VIP + cells were not identifiable given the waveform shape modality alone (only with 40% accuracy [Fig. S13 ]), here they needed to be directly identified via optotagging. As additional verification, the firing rate patterns produced by this VIP + cell (Fig. 8 A, top) are very similar to the PSTHs of VIP + cells documented elsewhere in the literature (compare Fig. 5 G in ref. 72 to Fig. 8 A, bottom). Fig. 8. Simultaneous monitoring of three interneuron cell types with PhysMAP reveals microcircuits during behavior. Open in a new tab A A simultaneously recorded optotagged VIP + cell (red) during visual stimulus (black full field flash) presentation with spike raster (top) and trial-averaged PSTH (mean spikes/s with SEM; bottom). B Cross-correlogram with the VIP + cell spike times (target) onto a SOM + (second SOM + cell in A) cell’s spike times (reference). Bins are 0.1 ms. Dashed line to indicate time bin zero. ( C , top) Cross-correlograms for a putative PV + cell onto the SOM + cell in F (2 ms bin width). Dashed line indicates 0 ms bin. ( C , bottom) Cross-correlograms for a putative PV + cell onto the VIP + cell in F (2 ms bin width). Dashed line indicates 0 ms lag. ( D , top) Trial-averaged PSTH aligned to onset of black full field flash (mean spikes/s with SEM). ( D , middle) Average spike waveform of the putative PV + neuron inhibiting both the SOM + and VIP + cells. ( D , bottom) 2D-autocorrelogram of the putative PV + cell with peak in firing rate at 67 Hz (2 ms time bins). Source data are provided as a Source Data file. Using pair-wise cross-correlations fitted with a generalized linear model of spiking interactions (GLMCC) 73 , we found that a SOM + and VIP + cell pair showed symmetric decreases in firing around time lag zero (Fig. 8 B), indicating possible mutual inhibition (a ubiquitous motif) 72 , 74 , 75 and/or simultaneous inhibition from an upstream interneuron. Investigating this latter hypothesis, we examined the cross-correlogram between a third neuron and the SOM + and VIP + cells and found it suggested that the VIP + -SOM + pair was strongly inhibited following this upstream cell’s spikes (Fig. 8 C; top and bottom, respectively). The third neuron had fast firing properties and a vigorous response to stimuli (Fig. 8 D, top) and a waveform with an extremely short peak-to-trough width (0.23 ms; Fig. 8 D, middle). This neuron also had a predominant peak in the autocorrelogram around 67 Hz (gamma band; Fig. 8 D, bottom) strongly suggestive of this being a PV + cell (although it was not identified by our algorithm). These types of connections were not hard to find in high-density probe recordings. In this particular experiment, there were 78 putative monosynaptic connections (Fig. S14 A), including both inhibitory and excitatory types (Fig. S14 B, top and middle, respectively), with some also being bidirectionally connected neurons mixing both inhibitory and excitatory connections (Fig. S14 B, bottom). The VIP + and SOM + units made several inhibitory connections each, furthering our confidence that they have been correctly identified as inhibitory types (units 6 and 7 in Fig. S14 A). These results suggest that not only can PhysMAP deal with batch effects and identify multiple untagged cell types, but it can also identify microcircuit interactions in vivo. Discussion We developed PhysMAP, an approach that uses multimodal electrophysiological information to compute a representation for simultaneous cell type identification in vivo. PhysMAP optimally combines single modalities across seven datasets, outperforms comparable deep-learning methods with substantially less computation 30 , and enables analysis of interactions between multiple cell types during behavior. We also present a case study demonstrating how microcircuit dynamics can be identified without supervision during behavior. While pure classifier approaches might seem sufficient for cell type identification, three major barriers make them unsuitable: ubiquitous hidden batch effects, scarcity of ground truth datasets, and uncertainty about which modalities to include. PhysMAP addresses all three challenges to trustworthy cell type identification. First, PhysMAP visualizes dataset misalignments, providing a critical assessment of how appropriate a dataset is for cell type identification. This diagnostic step prevents erroneous conclusions from misapplied identification. Our experiments demonstrated dramatic accuracy decreases (by 22% and 36% in Fig. S11 A and B, respectively, and by 19% and 26% in Fig. S12 C and F, respectively) when using datasets with misalignment due to batch effects. Direct identification, without visualization, does not make these effects visible. Other cell type identification tools have not grappled with batch effects because they assess performance on datasets without distributional shifts—training and test sets are randomly sampled from the same overall dataset, so by definition the distributional shift between sets tends to approach zero with increasing sample size. In the real world, batch effects always exist, and they are invisible to users of direct classification approaches. Second, most electrophysiological recordings lack ground truth. Of the large-scale mouse experiments with optotagging, each covers only a single brain region. For primates and other relevant species, no such datasets exist. PhysMAP offers exploratory visualization of neuronal heterogeneity—for example, revealing SOM + cell diversity across cortical areas, with both broad- and narrow-spiking waveforms as predicted by the literature 44 , 45 , 48 . Similarly, it revealed distinct properties of excitatory neurons across layers, aligning with observations from slice electrophysiological experiments 1 . This physiological variation within “discrete” cell types is invisible to many pure classifiers, but is readily apparent with PhysMAP. And in cases where partial ground truth is available, PhysMAP’s interpretable visualizations offer insight into which cell types are identified and where. Third, it is not well understood which modalities (provided they are not affected by batch effects) are most informative to use when building a reference dataset. PhysMAP offers an intuitive head-to-head comparison through visualization of each modality through per-modality visualization, a capability that pure classifier-based methods do not readily provide. For instance, in both juxtacellular and extracellular recordings, we show waveform shape is the most reliable modality for delineating ground truth cell type and ISI distribution, the least. These results reaffirm our previous work 24 , 25 and are inconsistent with other work that emphasizes spike timing information. Moreover, PhysMAP provides this natively on a per-modality and per-unit basis, while interpretability in pure classifier methods necessitates retraining on data with modalities and units censored one by one. One trade-off of this approach is that PhysMAP does not admit a reusable function for classifying untagged cells once trained; instead, the WNN representation must be recomputed by combining both new and old data. A potential concern is that there are data leakage effects from pooling new and old data into a WNN transformation, wherein information from test data could influence the unsupervised transformation itself and bias cross-validation results. We evaluated this using the control analysis from ref. 76 (see Supplementary Note 2 ) and found that any potential bias from applying the unsupervised transformation before train-test splitting is negligible and likely pessimistic. Specifically, validation accuracy ( A val : performance on held-out test data within the transformed subset) consistently matched generalization accuracy ( A gen : performance when the trained classifier is applied to completely held-out data not included in the transformation) across different data subset proportions, with the bias direction being consistently negative ( A val ≤ A gen ), meaning our cross-validation results are likely slightly conservative estimates of true performance. In ref. 76 , preprocessing bias is only incurred through data leakage for datasets of around a hundred samples or fewer; ours number several thousand. In light of these issues, how then should reference datasets be collected? We first recommend that ground-truth-generating experiments include standardized periods of “spontaneous activity” (involving no behavior) from which to generate informative spike timing modalities. These are then easily replicable as they can be appended onto a lab’s existing behavioral workflow. Thus, they are far less likely to be affected by batch effects (and this can be evaluated with PhysMAP). Additionally, other behavior-independent modalities should be explored, such as spike-triggered LFPs 56 or spike-LFP coupling, which may separate PV + and SOM + types more reliably 77 , 78 . Other modalities might include specific “localizer” stimuli 24 , 56 that generate distinctive activity patterns useful for identifying certain cell types. Other multimodal work has also shown that the multi-channel waveform “footprint” improves identification performance 79 . The multi-channel waveform was not investigated in this work, as that would preclude cross-dataset cell type identification (different probe geometries between Neuropixels 1.0 and Ultras). Our analysis also revealed that few existing datasets have sufficient single-unit isolation quality and comprehensive cell-type coverage to serve as reference datasets. Only the Ultras dataset contained reliable tagging for all three major cortical inhibitory types, and even this dataset covers only the visual cortex of the mouse. High-quality single-unit recordings with optotagging remain challenging due to light attenuation, transgene expression specificity 80 , and low yield for rarer cell types like VIP + neurons which compose only ~13% of inhibitory neurons 81 . In addition, single-unit isolation also remains challenging even with modern technologies 82 and sorting methods 83 . A recent study 84 predicts that, across publicly available datasets, isolation quality varies widely, with between 3.1 and 50.0% of spikes from purported single units being false positives from nearby units. While this may not significantly impact population-level analyses 85 , it can blur physiological differences between cell types which demand high-quality unit isolation. For example, mixing fast-firing narrow-spiking PV + cells with slow-firing broad-spiking excitatory cells can potentially create artifactual intermediate-property units, thus underscoring the importance of high-quality single-unit isolation 24 . This mixing effect is evident when comparing unambiguous juxtacellular recordings (showing stronger cell type structure) with extracellular recordings (showing less structure), even in highly curated datasets. Despite these issues, recent work has demonstrated several ways to improve dataset quality: higher-density recordings 55 and improved light delivery via waveguide optrodes 86 have been shown to increase yields. Additionally, improved protocols for isolating directly tagged cells, such as using synaptic transmission blockers 30 , further improve ground truth quality. Given these barriers, it might be tempting to ask why to choose to examine cell types with electrophysiological over optical approaches. Electrophysiology offers several advantages over optical approaches for cell type characterization: simultaneous monitoring of multiple cell types on single trials, scalable access to many cells across the entire brain, monitoring of monosynaptic connectivity and circuit interactions, and exploration of cell types in primates and non-model organisms. While optical methods allow cell type-specific population monitoring with perfect single unit isolation, most currently limit imaging to only two fluorophores simultaneously 87 . Electrophysiology enables monitoring all cell types together, helping to understand single-trial circuit dynamics 88 , 89 , and bridging anatomy and function 90 . Optical methods also require optical access, limiting them primarily to cortical regions due to light attenuation in tissue 80 . Deeper imaging requires GRIN lenses or cortical aspiration, causing significant tissue damage. Furthermore, optical methods are limited by their “photon budget” 91 : only a fixed number of photons are deliverable into the brain and so there exists a trade-off between number of units recorded and sampling rate 92 , 93 . Electrophysiology avoids these limitations, allowing arbitrary probe placement and simultaneous recording of thousands of neurons at high sampling rates 20 , with technological improvements promising even greater scaling. Optical methods also only offer their advantages at scale when applied to calcium imaging. However, calcium transients do not allow for the observation of interactions between cell types as this instead requires the imaging of action potentials. Even though voltage imaging allows individual spikes to be seen, this technique samples from even fewer neurons and only at shallower depths relative to calcium imaging due to hard technological barriers 93 . As we have shown, electrophysiology can identify dozens of putative monosynaptic connections within a single recording. Lastly, cell type-specific imaging requires transgene delivery and expression, limiting its use to certain model organisms. PhysMAP requires only electrical activity recordings, making it potentially valuable for studying cell types in non-human primates (pending generation of ground truth datasets), where viral methods and optical access are limited by technical constraints 13 , 14 , 94 . PhysMAP provides a potential low-risk solution for obtaining cell type information from routine electrophysiology in primates. In summary, PhysMAP offers robust exploration of putative cell types in unlabeled data and fast, efficient identification of cell types with ground truth. When used judiciously, it enables unsupervised identification of multiple cell types, in real time, in behaving animals. Methods The methods are organized as follows: dataset descriptions, the weighted-nearest-neighbor method, performance analyses, and label transfer methods. Finally, we describe the label transfer method to identify cell types along with various analyses to verify their properties. Statistics & reproducibility In each analysis, an open dataset was used (Table 1 ). We refer the reader to each dataset’s respective publication for additional methodological information and for justification of sample size or data exclusion criteria. In some cases, data was additionally excluded relative to the originating dataset: for the dataset from ref. 32 , we excluded spiking from ventral posteromedial thalamic neurons to keep the analysis and conclusions focused on cortex; for the dataset from ref. 95 , the signal-to-noise ratio threshold (SNR or spike quality index) was increased to 4.0 relative to the value of 2.5 used in the original publication; and for the Visual Behavior dataset, only units with an SNR above 3, an ISI violation rate below 5%, a presence ratio above 98%, and a baseline firing rate above 2 spikes/s were chosen. In addition, for VIP + -optotagged cells, we only selected those whose firing rate, in the first 10 ms after laser onset, rose to at least twice their baseline and and reached a firing rate of at least 25 spikes/s. These metrics were empirically determined such that the projected space of the waveform shapes matched between Visual Behavior and the Neuropixels Ultra datasets. Table 1. The seven datasets analyzed with the modalities used and the cell types identified in each Study n Used modalities Labeled cell types Brain areas Citation Yu et al. 32 246 Waveform shape, ISI dist., PSTH PV + -4, PV + -5, SOM + , E-4, E-5 S1 10.25378/janelia.8869115 Lakunina et al. 95 373 Waveform shape, ISI dist. PV + , SOM + , E (inferred) A1 https://github.com/sjara/jarapubs/tree/main/2018acsup/shared Petersen et al. 53 (Allen Institute Visual Coding and Buzsaki Lab) 430 Waveform shape, ISI dist., ACG, spike metrics PV + , SOM + , E, Axo-axonic (PV + ), VGAT + (pan-inhib.), VIP + Visual cortex and CA1 https://cellexplorer.org/publicdata/ground-truth-data/ & https://allensdk.readthedocs.io/en/latest/visual_coding_neuropixels.html Ye & Shelton et al. 55 8953 Waveform shape, 3D-ACG PV + , SOM + , VIP + Visual cortex https://www.biorxiv.org/content/10.1101/2023.08.23.554527v2 AIBS: Visual Behavior (Image set G and H) 5582 Waveform shape, 3D-ACG SOM + , VIP + Visual cortices https://allensdk.readthedocs.io/en/latest/visual_behavior_neuropixels.html Beau et al. 30 3301 Waveform shape, 3D-ACG PkC SS , PkC CS , MLI, MFB, GoC Cerebellum https://www.c4-database.com/ Open in a new tab Two datasets are contained in ref. 98 . Juxtacellular Mouse S1 Dataset The juxtacellular dataset used in Figs. 1 and 2 and analyzed in the section was collected by ref. 32 and downloaded from the associated file sharing portal (see Table 1 ). Recordings were performed in the primary somatosensory (barrel) cortex of Sst-IRES-Cre × Ai32, Pvalb-IRES-Cre/Pvalb-Cre × Ai32, or Vip-IRES-Cre × Ai32 mice. These experiments used in vivo juxtasomatic electrophysiological recordings with glass micropipettes. After recording, cells were filled with biocytin/neurobiotin. Filled neurons both acted as a verification of the recorded cell type via their morphology and also served as landmarks to align recording depths of each cell with cortical layers as determined by histology. ChR2-expressing neurons were located during recording by observing laser-evoked spikes that occurred 1–2 ms after the onset of brief light pulses (5 ms) delivered at low frequency (5 Hz) for 3 out of every 10 s. Spikes were examined by eye and non-spike events were removed after projection in PCA-space. To control for drift, only waveforms between the 25th and 75th percentile of peak-to-trough duration for all spikes from a cell were used in further waveform shape analyses (average waveform and waveform shape metrics). Averaged waveform shapes and ISI distribution were extracted for each neuron from the spkwaveform_all.mat file in the corresponding cell type structs. In addition, the waveform shape metrics of spike width and peak-to-trough ratio were also collected from this file. Cells labeled “fake SOM + ” were reassigned to the PV + population and cells labeled “putative SOM + ” were reassigned to SOM + . This reassignment was based on a careful investigation in ref. 32 , confirming earlier findings that off-target recombination occurs in fast-spiking neurons of somatostatin-IRES-Cre mice, possibly due to transient Cre expression during development 96 , 97 . PSTHs were calculated only from whisker touches during active whisking, and activity resulting from both whisker protraction and retraction was used. Spiking was aligned to touch-onset, and a PSTH calculated using 1 ms time bins. As not all cells contained PSTHs, only the subset of units containing all three modalities (waveform shape, ISI distribution, and PSTH) were used. To create the “concatenated” modality, we simply concatenated the waveform shape, ISI distribution, and PSTH for a given unit into a single long feature vector. Waveform metrics—peak-to-trough duration and peak-to-trough ratio—were calculated in the originating publication as the time from the first peak to the first trough and the ratio of absolute values of the peak to the trough, respectively. Extracellular Mouse A1 Dataset The extracellular data we analyzed from ref. 95 was downloaded from GitHub (see Table 1 ). Recordings were collected via silicon probes (A4 × 2-tet configuration from NeuroNexus), and light was delivered via optic fiber at around 200 μm from the first recording site. PV + and SOM + cells were identified by optotagging in Pvalb-Cre or Sst-Cre mice, respectively, that were the progeny of crossing LSL-ChR2 mice. Photoidentification of ChR2-expressing cells was relatively conservative with positively identified cells being those that exhibited significant firing rate changes ( p < 0.001, nonparametric Wilcoxon signed-rank test) in firing rate during the first 10 ms of stimulation-onset. Putative excitatory units were identified by a significant decrease in firing rate during the experiments in Sst-Cre mice. Recordings were collected from primary auditory cortex via silicon probe, and stimulation was via an optical fiber located at the top of the probe recording sites. Spikes were sorted offline in Klustakwik, and the units used in further analyses only if ISI violation rate (number of spike intervals < 2 ms) was less than 2% per cluster. In the original publication, only cells with spike quality index (SQI; ratio between the peak amplitude of the waveform and the average variance, calculated using the channel with the largest amplitude) above 2.5 were used; in our analysis, we only used cells with SQI above 4.0. Mean waveforms were calculated for a unit using the channel with greatest amplitude of spikes. Extracellular mouse visual cortex and hippocampus dataset (CellExplorer, Petersen et al.) The third dataset was obtained from the CellExplorer package 98 and is heterogeneous, being composed of two separate extracellular electrophysiological datasets from the Allen Institute’s Brain Observatory and the Buzsaki lab, and included waveform shape, ISI distribution, autocorrelogram (ACG), and various derived electrophysiological metrics. We used the derived electrophysiological metrics that all units shared and this included the following eleven: Spike width ( troughToPeak ) Peak-to-trough derivative ( troughtoPeakDerivative ) Pre-hyperpolarization peak-to-post depolarization peak ratio ( ab_ratio ) Coefficient of variation ( cv2 ) measuring ISI distribution ACG tau rise ( acg_tau_rise ) ACG tau decay ( acg_tau_decay ) ACG tau bursts ( acg_tau_burst ) ACG refractory period ( acg_refrac ) ACG decay amplitude ( acg_c ) ACG rise amplitude ( acg_d ) ACG burst amplitude ( acg_h ). More information on these metrics is available on the CellExplorer website docs ( link ). For the analyses, these metrics were concatenated for each neuron into a single vector per unit to form the electrophysiological metrics modality. Given the large number of publications and protocols that have contributed to the CellExplorer dataset, we only provide a brief overview here. Neuropixels ultra dataset (Ye & Shelton et al.) This dataset was collected as part of ref. 55 and was collected using Neuropixels Ultra probes inserted into mouse primary visual cortex. Unlike the originating dataset, we only used the peak amplitude channel which produced single-channel waveforms—this was for the purpose of being able to co-project both Visual Behavior and Neuropixels Ultra into the same embedding space and using a classifier to perform out-of-dataset classification. Unique to this dataset, an unsupervised procedure for optotagged unit identification was conducted by first concatenating the average PSTH for each stimulation pattern and intensity of a 1 s cosine ramp and a 10 ms square wave pulse at 0.2, 4.1, and 10.0 mW/mm 2 . This formed a neuron-by-response vector matrix which was then normalized and to which PCA was applied followed by UMAP on each time series PC. Then, DBSCAN (density-based spatial clustering of applications with noise 99 ) was applied with cluster radius ( ε ) set to the inflection point in distance distributions of the ten nearest neighbors. The cluster found by DBSCAN that contained a pattern of optogenetic excitation consistent with the pattern produced predominantly in response to the short 10 ms stimulus was then said to contain optotagged units. Only spikes that occurred during the “stim off” periods were used to calculate average normalized waveforms and 3D-ACGs. Visual Behavior dataset (Allen Institute) The Visual Behavior dataset, containing the Images H and Images G experiments, was downloaded using the Allen Institute’s AllenSDK package. Units were selected only if they were from primary visual cortex and higher visual areas. Furthermore, we were quite stringent with quality control: units were only selected for analysis if they had a SNR (maximum amplitude of the mean spike waveform divided by the standard deviation of background noise) exceeding 3; a maximum of ISI violation over firing rate ratio of 0.05 (to limit the false discovery rate; 84 ); a minimum presence ratio of 0.98 (the proportion of time a unit was present in a recording); and a baseline firing rate of 2 spikes/s over the entire recording. In addition, optotagged units were selected if their firing rose to twice their baseline during the first 10 ms of laser onset and were driven to a firing rate of at least 25 spikes/s. The 3D-ACGs were calculated by taking the spike times across the entire experiment except for the optotagging epoch which occurred at the end of the session. The 3D-ACGs used a 1000 ms window size and a 10 ms bin size and were log-transformed (matching the Ultras dataset) and were constructed using the NeuroPyxels function, fast_acg3d 61 . PhysMAP preprocessing Modalities from all neurons were preprocessed via the same steps required by and performed using Seurat v4: PCA reduction: All modalities were initially dimensionality reduced to the smallest input modality dimension since all modalities input to Seurat must have the same dimensionality. For the S1 dataset, this is 30 dimensions; for the A1 dataset, this is 20 dimensions; and for Ultras and Visual Behavior, this is 81 dimensions. Normalization: Each modality is separately normalized using a centered log ratio transform. Rescaling and centering: Each feature of each modality is linearly rescaled to occupy the same unit variance. Each feature is then centered by mean subtraction. Weighted nearest neighbor (WNN) algorithm The PhysMAP approach uses the WNN algorithm available from Seurat v4 35 which is summarized as the following steps. Nearest neighbor identification: Within the preprocessed, high-dimensional space of a given modality (here, waveform shape Fig. S1 A denoted “wf”), an i th single unit ( x i w f ) is selected (Fig. S1 B, blue sphere) and its nearest neighbors (indexed by j ) identified via Euclidean distance in the ambient (un-dimensionality reduced) space (Fig. S1 B, red spheres). Nearest neighbor prediction (within modality) : A prediction of the selected single unit’s waveform x ^ i , knn w f w f = ∑ j = 1 k x i , j w f k is made via unweighted averaging the k -nearest waveform neighbors (knn wf ) identified in Fig. S1 B. By default, we use k = 20 and Euclidean distances in the ambient space to locate the nearest neighbors. Within-modal affinity calculation: The unit’s nearest neighbor predicted waveform shape ( x ^ i , knn w f w f ) generated by k -nearest neighbors vs. its actual waveform shape ( x i w f ) are both then passed into a modified UMAP distance kernel, d UMAP ( x i , x ^ i ) ≡ exp − max ( 0 , d L 2 ( x i , x ^ i , k n n = 20 ) − d L 2 ( x i , x i , k n n = 1 ) ) σ i − d L 2 ( x i , x i , k n n = 1 ) 1 where d L 2 ( ⋅ ) is the Euclidean ( L 2 -norm) distance metric; d L 2 ( x i , x i , k n n = 1 ) is the Euclidean distance from x i to the nearest single neighbor; and σ i is a modified UMAP bandwidth equal to the average of the Euclidean distances from the i th unit to the k =20 nearest units with lowest non-zero Jaccard index. Note that non-zero Jaccard index is the same as saying that two data points must have at least one graph node in common. This equation is used to calculate the “within-modal affinity” which gives a measure of how predictive a certain modality is of this unit. This forms the numerator of the “affinity ratio” shown in Fig. S1 D. Nearest neighbor identification (cross modality): Examining normalized single unit ISI distributions (the “cross-modal” space) generated from the same neurons in Fig. S1 E, we locate the same unit and nearest neighbors previously identified but now in ISI distribution-space (Fig. S1 F). Nearest neighbor prediction (cross modality): As in Fig. S1 C, a nearest neighbor prediction is made but this time, in a different modality, albeit using the same neurons identified in the original modality (Fig. S1 G, red dashed circle). x ^ i , knn w f i s i = ∑ j = 1 k x i , j i s i k 2 Affinity ratio calculation: This unit’s ISI dist. ( x i i s i ) and the prediction of its ISI dist. ( x ^ i , knn w f i s i ) is computed by unweighted average of the waveform-space nearest neighbor units’ ISI dist. This is then used to compute the “cross-modal affinity” by passing it into a modified UMAP distance kernel; this forms the denominator of the waveform affinity ratio for a given unit S Wave ( i ) defined as, S Wave ( i ) = d UMAP x i wf , x ^ i , knn wf wf d UMAP x i isi , x ^ i , knn wf isi 3 (Fig. S1 D). This process is repeated for every unit in the dataset and also in the reverse manner: beginning with the ISI distribution-space as the within modality and with the waveform shape-space as the cross modality to find the ISI dist. affinity ratio S ISI ( i ) defined as S ISI ( i ) = d UMAP ( x i i s i , x ^ i , knn i s i i s i ) d UMAP ( x i w f , x ^ i , knn i s i w f ) 4 For datasets with more than two modalities, the affinity ratio is calculated for each modality versus every other and for every unit. Thus, for a dataset with d data points and n feature modalities, there will be 2 d ⋅ n 2 = 2 d ⋅ n ! 2 ! ( n − 2 ) ! = d ⋅ n ( n − 1 ) affinity ratios to calculate. Converting affinity ratios to modality weights: With affinity ratios calculated for both waveform and ISI distribution across all units, modality weights ( β Wave ( i ) and β ISI ( i )) for each unit can be calculated. For a given unit, this weight is the ratio of a given modality’s affinity ratio for that unit divided by the sum of all other modality’s affinity ratios for that unit (the softmax normalization). For the two-modality case, this is β Wave ( i ) = exp ( S Wave ( i ) ) exp ( S Wave ( i ) ) + exp ( S ISI ( i ) ) and β ISI ( i ) = exp ( S ISI ( i ) ) exp ( S Wave ( i ) ) + exp ( S ISI ( i ) ) (Fig. S1 H). For m numbers of modalities, the additional affinity ratios are added to the denominator such that for any n th modality’s affinity ratio β n ( i ), it is β n ( i ) = exp ( S n ( i ) ) ∑ 1 m exp ( S n ( i ) ) 5 Calculating unit pair-wise affinities: For every pair of units ( i and j ) in each modality ( n ), an additional “pair-wise affinity” is also calculated by passing both of them and their coordinates in some modality into UMAP’s distance kernel ( θ n = d UMAP ( i n , j n )). This occurs for the same pair of units in both the waveform shape-space (Fig. S1 I, top) and the ISI distribution-space (Fig. S1 I, bottom) to determine pair-wise affinities θ Wave ( i , j ) and θ ISI ( i , j ), respectively. This is done for all pairs of points and all modalities. Creating the WNN: To create the weighted-nearest neighbors representation, a modality-weighted sum of the pair-wise affinities (Fig. S1 J, top) is calculated to get the multimodal affinity between any pair of points ( θ WNN ( i , j )) from m modalities θ WNN ( i , j ) = ∑ n = 1 m β n ( i ) θ n ( i , j ) 6 is taken to produce a “connectivity matrix” (Fig. S1 J, bottom). It should be noted that θ WNN ( i , j ) ≠ θ WNN ( j , i ) and thus the pair-wise affinities are symmetrized by calculating the fuzzy union 38 : if A is the weighted adjacency matrix formed by θ WNN ( i , j ) across all pairs of points, then the symmetrized adjacency matrix ( B ) is B = A + A ⊤ − A ⊙ A ⊤ 7 where  ⊙ is the Hadamard product. The k -nearest neighbor algorithm is applied to this symmetrized matrix to form the final symmetrized WNN (default number of neighbors is k = 200) which is then visualized into two dimensions with UMAP’s force-directed graph layout projection for visualization. Leiden community detection To calculate the MARI score for each dataset across different numbers of clusters we used Leiden clustering 100 on each dataset’s WNN graphs with resolution between 0.1 and 3.0 in 0.1 resolution intervals. The Leiden algorithm is a method for “community detection” which finds highly interconnected nodes on a network graph, akin to clustering in a metric space. Algorithms like Leiden (and the simpler Louvain algorithm) attempt to find a partitioning of the network into a set of communities that maximizes the total modularity of the network. This modularity, H , is a measure of how interconnected the nodes are within a community versus outside of it. In the below definition, m is the total number of edges in the network, e c is the number of edges in a community c , γ is the resolution parameter, and K c is the sum of the degrees of the nodes in community c . H ≡ 1 2 m ∑ c e c − γ K c 2 2 m 8 Thus, the resolution parameter is effectively a prior on the number of expected communities that should be found during the optimization; with lower resolution, fewer communities are found and with higher resolution, more communities are found. Modified adjusted Rand index (MARI) calculation Once this partitioning of a graph into communities is computed, a MARI score 50 is calculated between each of these neuron’s community membership and the ground truth cluster identity to determine how closely they correspond. To understand MARI, which is a modification of the adjusted Rand index (ARI), we begin with an explanation of the Rand index. Given two clusterings, X and Y of the same dataset, the number of pair-wise elements that share cluster membership in both X and Y is a and the number of pair-wise elements that share different cluster memberships is b . The Rand index ( R I ) is R I = a + b n 2 where n is the total number of pairs. The Rand index can also be interpreted as the sum of the number of true positive and true negative correspondences divided by the total number of guesses if one clustering is regarded as a classifier prediction of the other. However, in the classifier interpretation, the Rand index is not corrected for chance predictions. The ARI corrects for these chance predictions by subtracting the expected Rand index under the hypergeometric distribution given two independent clusterings and fixed number of clusters in each. MARI further refines this metric by instead incorporating a multinomial distribution which does not enforce cluster size and is a better assumption given that most clustering algorithms (including Leiden) do not fix cluster sizes. This was used to compare each of the Leiden clusterings at different resolutions to underlying ground truth clusters. Peri-stimulus time histogram calculation For each Leiden cluster in Fig. 2 D, a PSTH was calculated by aligning times to each whisker deflection onset and binning spikes into 10 ms bins. This was then normalized by subtracting the baseline spike rate for each neuron and then dividing by the standard deviation of each unit’s PSTH. These were then smoothed by a 5-point moving average and then grouped according to Leiden cluster membership for between −10 and 50 ms before and after the whisker deflection. Identification algorithm After a WNN is constructed for a dataset, we used UMAP’s force-directed graph layout procedure to project the graph into a high-dimensional embedded space. Dimensionality for this embedding was maximized to provide the greatest amount of information available for classifier comparison (the WNN algorithm only allows for a maximal output dimensionality equal to the highest dimensional input modality). We then used a random 85-15% train-test split and trained a stochastic GBM classifier on the training set with fivefold cross-validation using the caret package in R 101 to identify each underlying cell type with a multiclass (one-vs-rest) objective function. In some datasets, cell type classes with fewer than 10 examples were excluded because this would not guarantee that a cell would appear in both the training and test sets at the train-test split used. We then repeated this train-test split 20 times and averaged the balanced accuracy over these independent runs. Each classifier also underwent hyperparameter tuning via a grid search. This procedure was run identically for the controls in Fig. S6 except with varying graph embedding dimensions and using different classifiers available in the caret package. This same approach was used for the three-modality case in Fig. S5 H. Gaussian mixture model analysis of spike metrics A GMM Fig. S3 was fit to units in ref. 32 by applying the mclust library’s Mclust function to the log-scaled peak-to-trough and log-scaled spike width metrics for each unit as done previously in the literature 23 , 25 . This function simultaneously compares many GMM models and finds the optimal number of clusters for each via the Bayesian information criterion. It arrived at a VVE (ellipsoidal with equal orientation) model and three clusters. β -variational autoencoder and multi-layer perceptron identification architectures Using the Ultras dataset, a β -variational autoencoder (VAE) was constructed using a standardized architecture for each modality (Fig. S10 ): a first/second 1-D convolutional layer ( N = 64, C in = 1/32, C out = 32/64, K size = 3) followed each by ReLU non-linearities and flattened; passed into an 81-dimensional latent embedding parametrized by mean μ and log variance log σ 2 (linear transform layers, latent dim. = 81, hidden dim. = 64); then unflattened and passed into a decoder composed of a first/second 1-D convolutional layer ( N = 64, C in = 64/32, C out = 32/1, K size = 3) with a ReLU in-between. Networks were trained with the Adam optimizer over 200 epochs, grid search optimized for β based upon classification accuracy, and with logistic Kullback–Leibler (KL) divergence annealing. The β -VAE was optimized using the evidence lower bound objective function balancing both L 2 norm reconstruction error and KL-divergence multiplied by the tunable β parameter. For the waveform shape VAE, β = 0.05 and for the 3D-ACG VAE, β = 0.1; note that these optimal β reduce the VAE to nearly a vanilla autoencoder. The multi-layer perceptron (MLP) classifier (scikit-learn’s MLPClassifier ) was composed of an input layer (10 units), hidden layer (100 units), ReLU non-linearity, final output layer (4 units), and softmax output for cell type prediction. The MLP classifier was trained for 1000 iterations with early stopping. Each architecture was trained on an NVIDIA L40S GPU with CUDA-optimized code. Identification comparison For each confusion matrix in Fig. 4 B, the projection and identification process was trained 25 times for each of PhysMAP, waveform shape, 3D-ACG, and the β -VAE. For each iteration, the transformation was applied to the entire dataset and then a seed selected to determine a random 90-10% train-test data split. Across ten random splittings, fivefold repeated cross-validation was applied and averaged (across repeated CVs and splittings) to determine each cell type’s raw classification accuracy. We also followed this same procedure for the confusion matrices in Fig. S11 with and without erroneous alignment. This procedure was also applied to PhysMAP with and without alignment on the C4 dataset shown in Fig. S11 B 61 . The alignment procedure is not used in further iterations of PhysMAP but is documented for comparison and to demonstrate the deleterious effects of misaligned data distributions. The alignment procedure is explained in the next section for clarity. Distributional shift in waveform shape To analyze the effects of distributional shift on classifier accuracy, we applied both 250 Hz- and 500 Hz-high-pass 4th order Butterworth filters to half of the normalized mean waveforms in the Ultras dataset (Fig. S12 A and D, respectively for each filter). A random forest classifier with fivefold cross-validation (n_estimators = 100, max_depth = 10) was trained on half of the data that was unfiltered and then tested on the other half of the data (Fig. S12 C and F, respectively for each filter). This analysis simulates the usage of a cell type classifier that was trained on a dataset with different but reasonably chosen preprocessing filters applied to waveform shapes 42 , 102 . Reference mapping with anchors and cell type identification Unlike the previous identification analyses, an 80-20% train-test split was conducted before applying PhysMAP. This was done to combat bias in cross-validation because of data leakage due to pre-processing transformations 76 . The training set was used to create the reference mapping upon, and the test set was used to create the query dataset. To construct the reference mapping, a WNN was constructed from each neuron’s waveform shape, ISI distribution, autocorrelogram, and derived electrophysiological metrics as before. Following the procedure for multimodal reference mapping recommended in Hao & Hao et al. 35 , we first ran supervised principal component analysis (SPCA) on the reference data. Next, the query dataset is projected onto the reference using the previously computed SPCA transform. Now that reference and query datasets occupy the same space, “anchors” can be calculated between the reference and query. These anchors are pairs of cells between the reference and query that are located within each other’s neighborhoods; this concept is also referred to as mutual nearest neighbors (MNN). These neighborhoods are defined by computing k -nearest neighbors with k = 5. This nearest neighbor search is conducted in only the top-30 SPC’s. Once all anchors are found, they are scored, which is an assessment of how confident we are in their correspondences. This score is calculated for each anchor given the 30 nearest neighbors in each reference and query dataset for both the reference and query data points of the anchor, respectively. The overlap of these nearest neighbor matrices between the 0.01 and 0.90 quantiles is then linearly rescaled to be between 0 and 1 for all reference-query anchor pairs; this provides a score for each anchor. A weight matrix is then constructed between each query cell c and each i th nearest anchor a i (where i ∈ [1, 50]) based upon the distance to each query cell and the corresponding anchor score. These weighted distances D c , i are calculated as D c , i = S a i 1 − ∣ ∣ c , a i ∣ ∣ ∣ ∣ c , a 50 ∣ ∣ 9 where S a i is the score of the i th anchor where ∣∣ ⋅ ∣∣ is the Euclidean distance. These distances are passed through a Gaussian distance kernel D c , i ~ as, D c , i ~ = 1 − − D c , i e ( 2 / s d ) 2 10 with sd = 1 by default. To form the entries of a weight matrix W c , i = D c , i ~ ∑ i j = 50 D c , j ~ . 11 For cell type identification, a classification matrix L is created where each row corresponds to a ground truth cell type class and each column corresponds to a reference anchor. If a certain reference anchor pertains to a certain cell type, it is given a 1 and a 0 if otherwise. Label predictions P are then computed simply as, P = L W T . 12 This returns a prediction score for each cell in the query dataset. A query cell is thus given a predicted cell type of whichever class has the highest prediction score. Joint embedding and label transfer of Ultras and Visual Behavior Both Ultras’ and Visual Behavior’s waveform shape and 3D-ACG modalities were concatenated and passed into PhysMAP. The multimodal representation was generated using caret with centered log ratio transform normalization on a per-unit basis. UMAP was calculated for 20 components, but the 2-component projection is used for the visualizations shown in Fig. 5 A. The same approach was used for the individual modalities shown in Fig. 5 B, top and bottom. For the multi-dataset nonlinear embedding of waveform shape (unimodal PhysMAP), shown are the optotagged cell type identities (PV + , SOM + , and VIP + ) from each experiment amidst a background of untagged neurons Fig. 6 E. Labels for Visual Behavior were generated using the previously described procedure (“Methods: Pre-processing of the Visual Behavior dataset”); labels for the Ultras dataset were generated by applying DBSCAN to a UMAP embedding of PSTH responses in the first 10 ms after laser-onset 55 . For label transfer from Ultras tags to Visual Behavior, we used a nearest neighbor approach: for a fixed number of neighbors ( k = 33) for each Visual Behavior unit within the high-dimensional graph constructed within PhysMAP, we calculated what percentage of neighbors (including unlabeled cells) contained a given label from the Ultras dataset and set a minimum percentage threshold belonging to a unitary cell type label (20% for PV + cells and 7.5% for SOM + cells) in order for a label to transfer. These inferred cell types are shown in (Fig. 6 F, G). This percentage can be adjusted to the desired level of confidence; accuracy increases with a higher percentage of neighbors in the Ultras dataset with accuracy measured as the number of correct identifications if only the Ultras dataset is considered Fig. S13 . The procedure was fixed at k = 33 and repeated 25 times for each percentile. This method worked well for both PV + and SOM + cells, but because VIP + cells were only very sparsely labeled and seemingly non-differentiated from broad-spiking excitatory cells, we used the direct labels obtained during the Visual Behavior experiments. Furthermore, VIP + cells were poorly identifiable even at the highest confidence thresholds (a maximum accuracy of 40% at 8% nearest neighbor threshold; Fig. S13 , red lines). Firing rate analysis of inferred PV + and SOM + cells and directly tagged VIP + celltypes For each PSTH in Figs. 7 and 8 , firing rates were determined by collecting spikes into 100 ms time bins, summed across trials, and then smoothed by a Gaussian kernel with a standard deviation of the number of total bins divided by 6. The same procedure was done for each individual inferred unit in the Visual Behavior dataset and normalized (dividing by the maximum firing rate) to generate Fig. 7 C and D. The stimulus used was a gray to black flash on a computer monitor for 100  ms across most of the visual field contralateral to the recorded hemisphere. To generate the CCGs in Fig. 8 B, C, we used a window/bin size of 3 ms/0.1 ms for the SOM + to VIP + CCG and 10 ms/0.2 ms for the VIP + and SOM + onto putative PV + , respectively. The ACG for the putative PV + cell is shown with 100 ms window size and 5 ms bin sizes. Identifying putative monosynapses with a GLMCC To identify putative monosynaptic connections between neurons, we examined each pair of neurons for low-latency responses on the timescale of synaptic transmission delays. We used the revised general linear model on cross-correlogram (GLMCC) approach by ref. 73 which tends to perform better than both using classical cross-correlogram analysis 103 and jittered cross-correlations 104 in terms of minimizing both false positives and false negative rates. Furthermore, the GLMCC also yields an estimate of the strength of synaptic connectivity, other than the classical and jittered methods, which only yield a binary identification or non-identification of a monosynaptic connection. More specifically, the underlying spike rate of a given neuron over time c ( t ) is given as the product of several exponential distributions modeling respectively slow time-varying fluctuations affecting each neuron in a pair a ( t ), the connection from the first neuron to the second J i j , and the connection of the second neuron to the first J j i . c ( t ) = exp ( a ( t ) + J i j f ( t ) + J j i f ( − t ) ) 13 Here, f ( t ) is modeled as, f ( t ) = exp − t − d τ 14 where d is the synaptic delay and τ is the synaptic timescale; the former is set to be between 1 and 4 ms while the latter is set to be 4 ms. Note that the underlying spike rate c ( t ) is modeled as a Poisson point process such that the spike probability p ({ t k }∣ θ ) over time with, p ( { t k } ∣ θ ) = ∏ k c ( t k ) exp − ∫ − W W c ( t ) d t 15 with a parametrization of θ = { a ( t ), J i j , J j i } and W being the integration window (set to 50 ms in our analysis). The prior distribution p ( θ ) is proportional to the following, p ( θ ) ~ exp − 1 γ ∫ − W W d a d t 2 d t 16 with the parameter γ setting the “flatness” of the a ( t ) is set to 2 × 10 −4 in our analysis. The posterior distribution p θ ∣ { t k } was calculated given Bayes’ theorem and a maximum a priori procedure used to calculate the parameters θ . A monosynaptic connection is said to exist if the null hypothesis is rejected; the null hypothesis is that two neurons generate spikes at their baseline firing rate independently of each other. The variance of a Poisson process within a time interval Δ is equal to its mean and thus the mean number of spikes n is n = c (0) Δ . If J is small then the average number of spikes caused by a connection over an interval Δ is, δ n = c ( 0 ) J τ 1 − e − Δ / τ . 17 The condition that a monosynaptic connection is found is given by ∣ δ n ∣ > z α n where z α = 3.891 for the α = 0.0001 used in this analysis. Isolating the estimated connection strength J ^ by substituting ∣ δ n ∣ > z α n into the previous equation yields, ∣ J ^ ∣ > z α Δ 1 / 2 τ ( 1 − e − Δ / τ ) ⋅ 1 c ( 0 ) 1 / 2 . 18 The variable Δ reaches its minimum at Δ = 1.26 τ which reduces the previous equation to the following, ∣ J ^ ∣ > 1.57 z α ( τ c ( 0 ) ) − 1 / 2 19 for which a connection is determined to be monosynaptic. Reporting summary Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article. Supplementary information Supplementary Information (33.4MB, pdf) Reporting Summary (91.9KB, pdf) Transparent Peer Review file (92.3KB, pdf) Source data Source Data (37.5MB, xlsx) Acknowledgements We are grateful to Dr. Karel Svoboda, Dr. Anna Lakunina, and Dr. Josh Siegle for the initial ideas of cell type classifiers for electrophysiology. We also thank Dr. Adam Smoulder, Dr. Yujin Han, Dr. Josh Siegle, Dr. Ching Fang, Pierre Boucher, Nicole Carr, Dr. Tian Wang, Vivian Moosmann, Tushar Arora, Mateo Umaguing, and Dr. Munib Hasnain for their thoughtful comments on our manuscript. CC was supported by an NIH NINDS R00NS092972, R01NS121409, R21NS135361 and R01NS122969 award; the Moorman-Simon Interdisciplinary Career Development Professorship from Boston University; the Whitehall Foundation (2019-12-77); and the Young Investigator Award from the Brain and Behavior Research Foundation (27923). The auditory cortex dataset (collected by AL and SJ) was supported by an NIH NIDCD R01DC015531. SJ was also supported by an NIH NINDS RF1NS131993. EKL was supported by an NIH NINDS F31NS131018. The Neuropixels Ultras dataset was supported by NIH NINDS/NIMH U01NS113252 awarded to NS. Author contributions E.K.L. and C.C. jointly developed the multi-modal cell type classifier approach. A.E.G. helped with derived waveform metric analysis and several control analyses. G.H. helped collect one of the open datasets and provided technical advice, especially with regard to the usage of quality metrics, and helped edit initial manuscript drafts. H.Y. and C.H. provided many useful discussions, suggested analyses, and provided access to several datasets. A.L. and S.J. provided technical support and also collected the A1 open datasets. A.S., S.O., and N.A.S. provided technical support and collected the Ultras dataset. P.F.P. provided guidance on various approaches for multi-modal integration and other technical advice. E.K.L. curated datasets. C.C. wrote initial R code and performed some analyses. Code was further refined and augmented by E.K.L. Additional analyses were also written by E.K.L. E.K.L. made figures and wrote initial drafts of the paper with C.C. All authors edited the manuscript and provided feedback on presentation and clarity. Peer review Peer review information Nature Communications thanks Xiaoxuan Jia and the other anonymous reviewer(s) for their contribution to the peer review of this work. A peer review file is available. Data availability Post-processed data used in analyses and figure generation are provided in the repository https://github.com/EricKenjiLee/PhysMAP_Manuscript . Raw datasets are available from each source publication’s open data repositories in Table 1 . Additionally, source data for all non-schematic main and Supplementary Figs. are provided as pages in a “Source Data” Excel file. Source data are provided with this paper. Code availability MATLAB, Python, and R for open dataset analysis and figure generation are available at https://github.com/EricKenjiLee/PhysMAP_Manuscript and is citable at 10.5281/zenodo.18239113. Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. Supplementary information The online version contains supplementary material available at 10.1038/s41467-026-71331-0. References 1. Scala, F. Phenotypic variation of transcriptomic cell types in mouse motor cortex. Nature 598 , 144–150 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 2. Gouwens, N. W. Integrated morphoelectric and transcriptomic classification of cortical gabaergic cells. Cell 183 , 935–953 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 3. (BICCN) BICCN A multimodal cell census and atlas of the mammalian primary motor cortex. Nature 598 , 86–102 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 4. Bomkamp, C. Transcriptomic correlates of electrophysiological and morphological diversity within and across excitatory and inhibitory neuron classes. PLoS Comput. Biol. 15 , e1007113 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 5. Keller, A. J. et al. A disinhibitory circuit for contextual modulation in primary visual cortex. Neuron 108 , 1181–1193.e8 (2020). [ DOI ] [ PMC free article ] [ PubMed ] 6. Kullander, K. & Topolnik, L. Cortical disinhibitory circuits: cell types, connectivity and function. Trends Neurosci. 44 , 643–657 (2021). [ DOI ] [ PubMed ] [ Google Scholar ] 7. Christensen, A. J., Ott, T. & Kepecs, A. Cognition and the single neuron: how cell types construct the dynamic computations of frontal cortex. Curr. Opin. Neurobiol. 77 , 102630 (2022). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 8. Ferguson, K. A. & Cardin, J. A. Mechanisms underlying gain modulation in the cortex. Nat. Rev. Neurosci. 21 , 80–92 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 9. Millman, D. J. VIP interneurons in mouse primary visual cortex selectively enhance responses to weak but specific stimuli. eLife 9 , e55130 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 10. Adesnik, H. & Naka, A. Cracking the function of layers in the sensory cortex. Neuron 100 , 1028–1043 (2018). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 11. Bohlen, M. & Tremblay, S. Considerations for the Use of Viral Vectors in Nonhuman Primates. In Vectorology for optogenetics and chemogenetics (eds Eldrige, M. A. G. & Galvan, A.) 293–329 (Humana, New York, NY, 2023). 12. Bliss-Moreau, E, Costa, V. D. & Baxter, M. G. A pragmatic reevaluation of the efficacy of nonhuman primate optogenetics for psychiatry. Oxf. Open Neurosci. 1 , kvac006 (2022). [ DOI ] [ PMC free article ] [ PubMed ] 13. O’Shea, D. J. The need for calcium imaging in nonhuman primates: new motor neuroscience and brain-machine interfaces. Exp. Neurol. 287 , 437–451 (2017). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 14. Trautmann, E. M. Dendritic calcium signals in rhesus macaque motor cortex drive an optical brain-computer interface. Nat. Commun. 12 , 3689 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 15. Takasaki, K., Abbasi-Asl, R. & Waters, J. Superficial bound of the depth limit of 2-photon imaging in mouse brain. eNeuro 7 , ENEURO.0255–19.2019 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 16. Jun, J. J. Fully integrated silicon probes for high-density recording of neural activity. Nature 551 , nature24636 (2017). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 17. 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). [ DOI ] [ PMC free article ] [ PubMed ] 18. Siegle, J. H. et al. Survey of spiking in the mouse visual system reveals functional hierarchy. Nature 592 , 86–92 (2021). [ DOI ] [ PMC free article ] [ PubMed ] 19. Chen, S. Brain-wide neural activity underlying memory-guided movement. Cell 187 , 676–691.e16 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 20. Bondy, A. G. et al. Coordinated cross-brain activity during accumulation of sensory evidence and decision commitment. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/2024.08.21.609044v1 (2024). 21. Paulk, A. C. et al. Large-scale neural recordings with single neuron resolution using Neuropixels probes in human cortex. Nat. Neurosci. 25 , 252–263 (2022). [ DOI ] [ PubMed ] 22. Leonard, M. K. et al. Large-scale single-neuron speech sound encoding across the depth of human cortex. Nature 626 , 593–602 (2023). [ DOI ] [ PMC free article ] [ PubMed ] 23. Trainito, C., Nicolai, C., Miller, E. K. & Siegel, M. Extracellular Spike Waveform Dissociates Four Functionally Distinct Cell Classes in Primate Cortex. Curr. Biol. 29 , 2973–2982.e5 (2019). [ DOI ] [ PubMed ] 24. Carr, N. et al. Neuropixels reveal laminar microcircuit organization in monkey V1 in vivo. Proc. Natl. Acad. Sci. 123 , e2521556123 (2025). [ DOI ] [ PMC free article ] [ PubMed ] 25. Lee, E. K. Non-linear dimensionality reduction on extracellular waveforms reveals cell type diversity in premotor cortex. eLife 10 , e67490 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 26. Sun, S. H., Killian, N. J. & Pezaris, J. S. More than expected: extracellular waveforms and functional responses in monkey LGN. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/2023.11.22.568065v1 (2024). 27. Latuske, P., Toader, O. & Allen, K. Interspike intervals reveal functionally distinct cell populations in the medial entorhinal cortex. J. Neurosci. 35 , 10963–10976 (2015). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 28. Schneider, A. Transcriptomic cell type structures in vivo neuronal activity across multiple timescales. Cell Rep. 42 , 112318 (2023). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 29. Abbaspoor, S. & Hoffman, K. Circuit dynamics of superficial and deep CA1 pyramidal cells and inhibitory cells in freely moving macaques. Cell Rep. 43 , 114519 (2024). [ DOI ] [ PMC free article ] [ PubMed ] 30. Beau, M. et al. A deep learning strategy to identify cell types across species from high-density extracellular recordings. Cell. 188 , 2218–2234.e22 (2025). [ DOI ] [ PMC free article ] [ PubMed ] 31. Pinto, L. & Dan, Y. Cell-type-specific activity in prefrontal cortex during goal-directed behavior. Neuron 87 , 437–450 (2015). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 32. Yu, J., Hu, H., Agmon, A. & Svoboda, K. Recruitment of GABAergic interneurons in the barrel cortex during active tactile behavior. Neuron 104 , 412–427.e4 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 33. Ramadan, M. A standardized nonvisual behavioral event is broadcasted homogeneously across cortical visual areas without modulating visual responses. eNeuro 9 , ENEURO.0491–21.2022 (2022). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 34. Cembrowski, M. S. & Menon, V. Continuous variation within cell types of the nervous system. Trends Neurosci. 41 , 337–348 (2018). [ DOI ] [ PubMed ] [ Google Scholar ] 35. Hao, Y. Integrated analysis of multimodal single-cell data. Cell 184 , 3573–3587.e29 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 36. Baltrusaitis, T., Ahuja, C. & Morency, L. P. Multimodal machine learning: a survey and taxonomy. IEEE Trans. Pattern Anal. Mach. Intell. 41 , 423–443 (2019). [ DOI ] [ PubMed ] [ Google Scholar ] 37. Zhu, C., Preissl, S. & Ren, B. Single-cell multimodal omics: the power of many. Nat. Methods 17 , 11–14 (2020). [ DOI ] [ PubMed ] [ Google Scholar ] 38. McInnes, L., Healy, J. & Melville, J. UMAP: uniform manifold approximation and projection for dimension reduction. Preprint at https://arxiv.org/abs/1802.03426 (2018). 39. Krimer, L. S. Cluster analysis–based physiological classification and morphological properties of inhibitory neurons in layers 2–3 of monkey dorsolateral prefrontal cortex. J. Neurophysiol. 94 , 3009–3022 (2005). [ DOI ] [ PubMed ] [ Google Scholar ] 40. Zaitsev, A. V. Interneuron diversity in layers 2-3 of monkey prefrontal cortex. Cereb. Cortex 19 , 1597–1615 (2008). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 41. Swanson, E. Simultaneous trimodal single-cell measurement of transcripts, epitopes, and chromatin accessibility using tea-seq. eLife 10 , e63632 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 42. Lee, K., Carr, N., Perliss, A. & Chandrasekaran, C. Wavemap for identifying putative cell types from in vivo electrophysiology. STAR Protoc. 4 , 102320 (2023). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 43. Huang, W. et al. On the comparison between multi-modal and single-modal contrastive learning. In Advances in Neural Information Processing Systems . 37 , 81549–81605 (Curran Associates, Inc., 2024). 44. Urban-Ciecko, J. & Barth, A. L. Somatostatin-expressing neurons in cortical networks. Nat. Rev. Neurosci. 17 , 401–409 (2016). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 45. Wu, S. J. et al. Cortical somatostatin interneuron subtypes form cell-type-specific circuits. Neuron 111 , 2675–2692.e9 (2023). [ DOI ] [ PMC free article ] [ PubMed ] 46. Yavorska, I. & Wehr, M. Somatostatin-expressing inhibitory interneurons in cortical circuits. Front. Neural Circuits 10 , 76 (2016). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 47. Kriegeskorte, N., Simmons, W. K., Bellgowan, P. S. F. & Baker, C. I. Circular analysis in systems neuroscience: the dangers of double dipping. Nat. Neurosci. 12 , nn.2303 (2009). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 48. Hostetler, R. E., Hu, H. & Agmon, A. Genetically defined subtypes of somatostatin-containing cortical interneurons. eNeuro 10 , ENEURO.0204-23.2023 (2023). [ DOI ] [ PMC free article ] [ PubMed ] 49. Sun, S. H. Analysis of extracellular spike waveforms and associated receptive fields of neurons in cat primary visual cortex. J. Physiol. 599 , 2211–2238 (2021). [ DOI ] [ PubMed ] [ Google Scholar ] 50. Sundqvist, M., Chiquet, J. & Rigaill, G. Adjusting the adjusted Rand Index. Comput. Stat. 38 , 327–347 (2020). 51. Kvitsiani, D. Distinct behavioural and network correlates of two interneuron types in prefrontal cortex. Nature 498 , 363–366 (2013). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 52. Kim, D. Distinct roles of parvalbumin- and somatostatin-expressing interneurons in working memory. Neuron 92 , 902–915 (2016). [ DOI ] [ PubMed ] [ Google Scholar ] 53. Petersen, P. C., Hernandez, M. & Buzsáki, G. The Buzsaki Lab Databank - Public electrophysiological datasets from awake animals (2020). 54. Sanzeni, A. Inhibition stabilization is a widespread property of cortical networks. eLife 9 , e54875 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 55. Ye, Z. Ultra-high-density neuropixels probes improve detection and identification in neuronal recordings. Neuron 113 , 3966–3982 (2025). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 56. Herzfeld, D. J., Hall, N. J. & Lisberger, S. G. Strategies to decipher neuron identity from extracellular recordings in the cerebellum of behaving non-human primates. J. Neurosci. 45 , e0230252025 (2025). [ DOI ] [ PMC free article ] [ PubMed ] 57. Laboratory, I. B. et al. Reproducibility of in vivo electrophysiological measurements in mice. eLife 13 , RP100840 (2025). [ DOI ] [ PMC free article ] [ PubMed ] 58. Zhang, Y., Patil, P., Johnson, W. E. & Parmigiani, G. Robustifying genomic classifiers to batch effects via ensemble learning. Bioinformatics 37 , 1521–1527 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 59. Soneson, C., Gerster, S. & Delorenzi, M. Batch effect confounding leads to strong bias in performance estimates obtained by cross-validation. PLoS ONE 9 , e100335 (2014). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 60. Stuart, T. Comprehensive integration of single-cell data. Cell 177 , 1888–1902.e21 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 61. Beau, M. et al. NeuroPyxels: Loading, Processing and Plotting Neuropixels Data in Python. Zenodo , 10.5281/zenodo.5509733 (2021). 62. The Allen Institute for Brain Science. Allen Brain Observatory: Visual Behavior Neuropixels Technical White Paper. (2022). 63. Zhu, F. et al. Open-world machine learning: a review and new outlooks. Preprint at https://arxiv.org/abs/2403.01759 (2025). 64. Sohal, V. S., Zhang, F., Yizhar, O. & Deisseroth, K. Parvalbumin neurons and gamma rhythms enhance cortical circuit performance. Nature 459 , 698–702 (2009). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 65. Cardin, J. A. Driving fast-spiking cells induces gamma rhythm and controls sensory responses. Nature 459 , 663–667 (2009). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 66. Chen, G. Distinct inhibitory circuits orchestrate cortical beta and gamma band oscillations. Neuron 96 , 1403–1418.e6 (2017). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 67. Ma, W. Visual representations by cortical somatostatin inhibitory neurons–selective but with weak and delayed responses. J. Neurosci. 30 , 14371–14379 (2010). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 68. Gentet, L. J. Unique functional properties of somatostatin-expressing GABAergic neurons in mouse barrel cortex. Nat. Neurosci. 15 , 607–612 (2012). [ DOI ] [ PubMed ] [ Google Scholar ] 69. Luo, L. Architectures of neuronal circuits. Science 373 , eabg7285 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 70. Bastos, A. M. Canonical microcircuits for predictive coding. Neuron 76 , 695–711 (2012). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 71. Fishell, G. & Kepecs, A. Interneuron types as attractors and controllers. Annu. Rev. Neurosci. 43 , 1–30 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 72. Lee, S., Kruglikov, I., Huang, Z. J., Fishell, G. & Rudy, B. A disinhibitory circuit mediates motor integration in the somatosensory cortex. Nat. Neurosci. 16 , 1662–1670 (2013). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 73. Kobayashi, R. Reconstructing neuronal circuitry from parallel spike trains. Nat. Commun. 10 , 4468 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 74. Campagnola, L. Local connectivity and synaptic dynamics in mouse and human neocortex. Science 375 , eabj5861 (2022). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 75. Pi, H. J. Cortical interneurons that specialize in disinhibitory control. Nature 503 , 521–524 (2013). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 76. Moscovich, A. & Rosset, S. On the cross-validation bias due to unsupervised preprocessing. J. R. Stat. Soc. Ser. B Stat. Methodol. 84 , 1474–1502 (2022). [ Google Scholar ] 77. Wei, Y. Associations between in vitro, in vivo and in silico cell classes in mouse primary visual cortex. Nat. Commun. 14 , 2344 (2023). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 78. Onorato, I. et al. Distinct roles of PV and Sst interneurons in visually induced gamma oscillations. Cell Rep. 44 , 115385 (2025). [ DOI ] [ PubMed ] 79. Yu, H. et al. In vivo cell-type and brain region classification via multimodal contrastive learning. in Proc. Thirteenth International Conference on Learning Representations, ICLR 2025, Singapore, April 24–28, 2025. (OpenReview.net, 2025). 80. Li, N. Spatiotemporal constraints on optogenetic inactivation in cortical circuits. eLife 8 , e48622 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 81. Prönneke, A. Characterizing VIP neurons in the barrel cortex of VIPcre/tdTomato mice reveals layer-specific differences. Cereb. Cortex 25 , 4854–4868 (2015). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 82. Buccino, A. P., Garcia, S. & Yger, P. Spike sorting: new trends and challenges of the era of high-density probes. Prog. Biomed. Eng. 4 , 022005 (2022). [ Google Scholar ] 83. Pachitariu, M., Steinmetz, N., Kadir, S. & Carandini, M. D. HK Kilosort: realtime spike-sorting for extracellular electrophysiology with hundreds of channels. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/061481v1 (2016). 84. Vincent, J. P. & Economo, M. N. Assessing cross-contamination in spike-sorted electrophysiology data. eNeuro 11 , ENEURO.0554-23.2024 (2024). [ DOI ] [ PMC free article ] [ PubMed ] 85. Trautmann, E. M. et al. Accurate estimation of neural population dynamics without spike sorting. Neuron 103 , 292–308.e4 (2019). [ DOI ] [ PMC free article ] [ PubMed ] 86. Lakunina, A. et al. Neuropixels opto: combining high-resolution electrophysiology and optogenetics. Preprint at bioRxiv https://www.biorxiv.org/content/10.1101/2025.02.04.636286v1 (2025). [ DOI ] [ PMC free article ] [ PubMed ] 87. Aharoni, D. & Hoogland, T. M. Circuit investigations with open-source miniaturized microscopes: past, present and future. Front. Cell Neurosci. 13 , 141 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 88. Peixoto, D. et al. Decoding and perturbing decision states in real time. Nature 591 , 604–609 (2021). [ DOI ] [ PubMed ] 89. Boucher, P. O. Initial conditions combine with sensory evidence to induce decision-related dynamics in premotor cortex. Nat. Commun. 14 , 6510 (2023). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 90. Esparza, J., Sebastián, E. R. & Prida, L. M. dl From cell types to population dynamics: Making hippocampal manifolds physiologically interpretable. Curr. Opin. Neurobiol. 83 , 102800 (2023). [ DOI ] [ PubMed ] [ Google Scholar ] 91. Ji, N. The practical and fundamental limits of optical imaging in mammalian brains. Neuron 83 , 1242–1245 (2014). [ DOI ] [ PubMed ] [ Google Scholar ] 92. Lecoq, J., Orlova, N. & Grewe, B. F. Wide. Fast. Deep. Recent advances in multi-photon microscopy of in vivo neuronal activity. J. Neurosci . 39 , 9042–9052 (2019). [ DOI ] [ PMC free article ] [ PubMed ] 93. Brooks, F. P., Davis, H. C., Wong-Campos, J. D. & Cohen, A. E. Optical constraints on two-photon voltage imaging. Neurophotonics 11 , 035007–035007 (2024). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 94. Bliss-Moreau, E., Costa, V. D. & Baxter, M. G. A pragmatic reevaluation of the efficacy of nonhuman primate optogenetics for psychiatry. Oxf. Open Neurosci. 1 , kvac006 (2022). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 95. Lakunina, A. A., Nardoci, M. B., Ahmadian, Y. & Jaramillo, S. Somatostatin-expressing interneurons in the auditory cortex mediate sustained suppression by spectral surround. J. Neurosci. 40 , 3564–3575 (2020). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 96. Ma, Y., Hu, H., Berrebi, A. S., Mathers, P. H. & Agmon, A. Distinct subtypes of somatostatin-containing neocortical interneurons revealed in transgenic mice. J. Neurosci. 26 , 5069–5082 (2006). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 97. Hu, H., Cavendish, J. Z. & Agmon, A. Not all that glitters is gold: off-target recombination in the somatostatin-IRES-Cre mouse line labels a subset of fast-spiking interneurons. Front. Neural Circuits 7 , 195 (2013). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 98. Petersen, P. C., Siegle, J. H., Steinmetz, N. A., Mahallati, S. & Buzsáki, G. CellExplorer: a framework for visualizing and characterizing single neurons. Neuron 109 , 3594–3608.e2 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 99. Ester, M., Kriegel, H. P., Sander, J., Xu, X. A Density-based Algorithm for Discovering Clusters in Large Spatial Databases with Noise . 226–231 (AAAI Press, 1996). 100. Traag, V. A., Waltman, L. & Eck, N. J. From Louvain to Leiden: guaranteeing well-connected communities. Sci. Rep. 9 , 5233 (2019). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 101. Kuhn, M. Building predictive models in R using the caret package. J. Stat. Softw. 28 , 1–26 (2008).27774042 [ Google Scholar ] 102. Vigneswaran, G., Kraskov, A. & Lemon, R. N. Large identified pyramidal cells in macaque motor and premotor cortex exhibit “Thin Spikes”: implications for cell type classification. J. Neurosci. 31 , 14235–14242 (2011). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 103. Aertsen, A. M. & Gerstein, G. L. Evaluation of neuronal connectivity: sensitivity of cross-correlation. Brain Res. 340 , 341–354 (1985). [ DOI ] [ PubMed ] [ Google Scholar ] 104. Amarasingham, A., Harrison, M. T., Hatsopoulos, N. G. & Geman, S. Conditional modeling and the jitter method of spike resampling. J. Neurophysiol. 107 , 517–531 (2012). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] 105. Xiao, D., Forys, B. J., Vanni, M. P. & Murphy, T. H. MesoNet allows automated scaling and segmentation of mouse mesoscale cortical maps using machine learning. Nat. Commun. 12 , 5992 (2021). [ DOI ] [ PMC free article ] [ PubMed ] [ Google Scholar ] Associated Data This section collects any data citations, data availability statements, or supplementary materials included in this article. Supplementary Materials Supplementary Information (33.4MB, pdf) Reporting Summary (91.9KB, pdf) Transparent Peer Review file (92.3KB, pdf) Source Data (37.5MB, xlsx) Data Availability Statement Post-processed data used in analyses and figure generation are provided in the repository https://github.com/EricKenjiLee/PhysMAP_Manuscript . Raw datasets are available from each source publication’s open data repositories in Table 1 . Additionally, source data for all non-schematic main and Supplementary Figs. are provided as pages in a “Source Data” Excel file. Source data are provided with this paper. MATLAB, Python, and R for open dataset analysis and figure generation are available at https://github.com/EricKenjiLee/PhysMAP_Manuscript and is citable at 10.5281/zenodo.18239113. Articles from Nature Communications are provided here courtesy of Nature Publishing Group ACTIONS View on publisher site PDF (4.3 MB) Cite Collections Permalink RESOURCES Similar articles Cited by other articles Links to NCBI Databases Follow NCBI NCBI on X (formerly known as Twitter) NCBI on Facebook NCBI on LinkedIn NCBI on GitHub NCBI RSS feed Connect with NLM NLM on X (formerly known as Twitter) NLM on Facebook NLM on YouTube National Library of Medicine 8600 Rockville Pike Bethesda, MD 20894 Web Policies FOIA HHS Vulnerability Disclosure Help Accessibility Careers NLM NIH HHS USA.gov Back to Top

Related documents

Record · ID 275417 · SHA-256 5dde771b1bbc62da
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive