INTRODUCTIONHigh-density electrode arrays now allow for simultaneous extracellular recording from hundreds to thousands of neurons across interconnected brain regions (Jun et al., 2017;Steinmetz et al., 2021;Ye et al., 2023b;Trautmann et al., 2023). While significant progress has been made in developing algorithms for tracking neural activity (Hennig et al., 2019;Buccino et al., 2020;Magland et al., 2020;Boussard et al., 2023;Pachitariu et al., 2024), identifying cell types and brain regions solely from electrophysiological features remains an open problem.Traditional approaches for electrophysiological cell-type classification utilize simple features of the extracellular action potential (EAP) such as its width or peak-to-trough amplitude (Mountcastle et al., 1969;Matthews & Lee, 1991;Nowak et al., 2003;Barthó et al., 2004;Vigneswaran et al., 2011) or features of neural activity, such as the inter-spike interval distribution (Latuske et al., 2015;Jouty et al., 2018). These simple features are interpretable and easy to visualize but lack discriminative power and robustness across different datasets (Weir et al., 2015;Gouwens et al., 2019). Current automated featurization methods for EAPs (Lee et al., 2021;Vishnubhotla et al., 2024) and neural activity (Schneider et al., 2023a) improve upon manual features but are limited to a single modality.There has been a recent push to develop multimodal methods that can integrate information from both recorded EAPs and spiking activity. PhysMAP (Lee et al., 2024) is a UMAP-based (McInnes et al., 2018a) approach that can predict cell-types using multiple physiological modalities through a weighted nearest neighbor graph. Another recently introduced method utilizes variational autoencoders (VAEs) to embed each physiological modality separately and then combines these embeddings before classification (Beau et al., 2025). Although both methods show promising results, PhysMAP is hard to fine-tune for downstream tasks as it is nondifferentiable, and the VAE-based method captures features that are important for reconstruction, not discrimination, impairing downstream performance (Guo et al., 2017). Neither approach has been used to classify brain regions.In this work, we introduce a multimodal contrastive learning method for neurophysiological data, Neuronal Embeddings via MultimOdal Contrastive Learning (NEMO), which utilizes large amounts of unlabeled paired data for pre-training and can be fine-tuned for different downstream tasks including cell-type and brain region classification. We utilize a recently developed contrastive learning framework (Radford et al., 2021) to jointly embed individual neurons' activity autocorrelations and average extracellular waveforms. The key assumption of our method is that jointly embedding different modalities into a shared latent space will capture shared information while discarding modalityspecific noise (Huang et al., 2024). We evaluate NEMO on cell-type classification using optotagged Neuropixels Ultra (NP Ultra) data from the mouse visual cortex (Ye et al., 2023b) and optotagged Neuropixels 1 data from the mouse cerebellum (Beau et al., 2025). We evaluate NEMO on brain region classification using the International Brain Laboratory (IBL) Brain-wide Map dataset (IBL et al., 2023). Across all datasets and tasks, NEMO outperforms current unsupervised (PhysMAP and VAEs) and supervised methods, with particularly strong performance in label-limited regimes. These results demonstrate that NEMO is a significant advance towards accurate cell-type and brain region classification from electrophysiological recordings.
RELATED WORK
CONTRASTIVE LEARNING FOR NEURONAL DATASETSThe goal of contrastive learning is to find an embedding space where similar examples are close together while dissimilar ones are well-separated (Le-Khac et al., 2020). Contrastive learning has found success across a number of domains including language (Reimers & Gurevych, 2019), vision (Chen et al., 2020), audio (Saeed et al., 2021), and multimodal learning (Radford et al., 2021;Tian et al., 2020). Contrastive learning has also been applied to neuronal morphological data (Chen et al., 2022), connectomics data (Dorkenwald et al., 2023) and preprocessed spiking activity (Azabou et al., 2021;Urzay et al., 2023;Schneider et al., 2023b;Antoniades et al., 2023). In each of these applications, associated downstream tasks such as 3D neuron reconstruction, cellular sub-compartment classification, or behavior prediction have shown improvement using this contrastive paradigm. One contrastive method, CEED, has been applied to raw extracellular recordings to perform spike sorting and cell-type classification. In contrast to NEMO, CEED is unimodal (it ignores neural activity) and has never been applied to optotagged data or brain region classification (Vishnubhotla et al., 2024).
CELL-TYPE CLASSIFICATIONThe goal of cell-type classification is to assign neurons to distinct classes based on their morphology, function, electrophysiological properties, and molecular markers (Masland, 2004). Current transcriptomic (Tasic et al., 2018;Gala et al., 2019;Yao et al., 2021;2023) and optical methods (Cardin et al., 2010;Kravitz et al., 2013;Lee et al., 2020) are effective but require extensive sample preparation or specialized equipment, limiting their scalability and applicability for in-vivo studies (Lee et al., 2024). Recently, calcium imaging has been utilized in conjunction with molecular approaches to identify cell-types (Bugeon et al., 2022;Mi et al., 2023). This approach has low temporal resolution and requires substantial post hoc effort to align molecular imaging with calcium data, making it unsuitable for closed-loop in vivo experiments. A promising alternative is to use the electrophysiological properties of recorded neurons as they capture some of the variability of the transcriptomic profile (Bomkamp et al., 2019). Simple electrophysiological features from a neuron's EAP and spiking activity are commonly used to identify putative cell types, such as excitatory and inhibitory cells (Frank et al., 2001;Gouwens et al., 2019). Automated methods including EAP-specific methods (Lee et al., 2021) and activity-based methods (Schneider et al., 2023a) are an improvement in comparison to manual features. Most recently, multi-modal cell-type classification methods including PhysMAP (Lee et al., 2024) and a VAE-based algorithm (Beau et al., 2025;Herzfeld et al., 2025) have been introduced which make use of multiple physiological modalities such as the EAP, activity, or peri-stimulus time histogram (PSTH).
BRAIN REGION CLASSIFICATIONBrain region classification consists of predicting the location of a neuron or electrode based on the recorded physiological features (Steinmetz et al., 2018;Davis et al., 2023). Rather than predicting a 3D location, the task is to classify the brain region a neuron or electrode occupies, which can be estimated using post-insertion localization via histology (Sunkin et al., 2012). Brain region classification is an important task for understanding fundamental differences in physiology between brain areas and for targeting regions that are hard to hit via insertion. Most importantly, brain region classification can provide a real-time estimate of the probe's location in the brain during experiments. Additionally, insertions in primates and human subjects often lack histological information, instead relying on the experimental heuristics that lack standardization between laboratories. As this task is relatively new, only simple features of the EAPs have been utilized for classification (Jia et al., 2019;Tolossa et al., 2024).
DATASETSFor cell-type classification, we use two mouse datasets: an opto-tagged dataset from the visual cortex recorded with Neuropixels Ultra (NP Ultra; Ye et al., 2023b) and a dataset from the cerebellar cortex recorded with Neuropixels 1 (Beau et al., 2025). For brain region classification, we utilize the IBL Brain-wide Map of neural activity from mice performing a decision-making task (IBL et al., 2023).NP Ultra opto-tagged mouse data. This dataset consists of NP Ultra recordings of spontaneous and opto-stimulated activity from the visual cortex of mice. We included spontaneous periods only and excluded units that have less than 100 spikes after removal of stimulation periods (see Supplement C). We obtained 462 ground-truth neurons with three distinct cell-types. The ground-truth neurons are composed of 237 parvalbumin (PV), 107 somatostatin (SST), and 118 vasoactive intestinal peptide cells (VIP). There are also 8491 unlabelled neurons that we can utilize for pre-training.C4 cerebellum dataset. This dataset consists of Neuropixels recordings from the cerebellar cortex of mice. Opto-tagging is utilized to label 202 ground-truth neurons with five distinct cell-types. The ground-truth neurons are composed of 27 molecular layer interneurons (MLI), 18 Golgi cells (GoC), 30 mossy fibers (MF), 69 Purkinje cell simple spikes (PCss), and 58 Purkinje cell complex spikes (PCcs). There are 3,090 unlabelled neurons for pretraining.IBL Brain-wide Map. This dataset consists of Neuropixels recordings from animals performing a decision-making task. Each neuron is annotated with the brain region where it is located. We utilize 675 insertions from over 100 animals, yielding 37017 'good' quality neurons after spike sorting and quality control (Banga et al., 2022;IBL et al., 2022). Each brain is parcellated with 10 brain atlas annotations divided into 10 broad areas: isocortex, olfactory areas (OLF), cortical subplate (CTXsp), cerebral nuclei (CNU), thalamus (TH), hypothalamus (HY), midbrain (MB), hindbrain (HB), cerebellum (CB) and hippocampal formation (HPF). We divide this dataset into a training, validation, and testing set by insertion such that we can evaluate each model on heldout insertions.
NEMOWe introduce Neuronal Embeddings via MultimOdal contrastive learning (NEMO), which learns a multimodal embedding of neurophysiological data. To extract representations from multiple modalities, we utilize Contrastive Language-Image Pretraining (CLIP; Radford et al., 2021). CLIP uses a contrastive objective to learn a joint representation of images and captions. For NEMO, we utilize the same objective but with modality-specific data augmentations and encoders (see Figure 1c).
PREPREPROCESSINGWe construct a paired dataset of spiking activity and EAPs for all recorded neurons. Using the open-source Python package NeuroPyxels (Beau et al., 2021), we computed an autocorrelogram (ACG) image for each neuron by smoothing the spiking activity with a 250-ms width boxcar filter, dividing the firing rate distribution into 10 deciles, and then building ACGs for each decile (see Figure 1b). This ACG image is a useful representation because the activity autocorrelations of a neuron can change as a function of its firing rate. By computing ACGs for each firing rate decile, the ACG image will account for firing rate dependent variations in the autocorrelations, allowing for comparisons between different areas of the brain, behavioral contexts, and animals (Beau et al., 2025). For the EAPs, we construct a 'template' waveform which is the mean of ∼500 waveforms for that neuron. For NP Ultra, we utilize multi-channel templates which take advantage of the detailed spatial structure enabled by the small channel spacing; we use nine channels with the highest peakto-peak (ptp) amplitude, re-ordered from highest to lowest amplitude. For the C4 and IBL dataset, all main text results utilize templates consisting of one channel with maximal amplitude.
DATA AUGMENTATIONSPrevious work on contrastive learning for spiking activity utilizes data augmentations including sparse multiplicative noise (pepper noise), Gaussian noise, and temporal jitter (Azabou et al., 2021). As it is computationally expensive to construct ACG images for each batch during training, we instead design augmentations directly for the ACG images rather than the original spiking data. Our augmentations include temporal Gaussian smoothing, temporal jitter, amplitude scaling, additive Gaussian noise, and multiplicative pepper noise (see Supplemental B for more details and Supplementary Figure 14 for an ablation). For single channel templates, we use additive Gaussian noise as our only augmentation. For multi-channel templates, we also include electrode dropout and amplitude jitter as described in Supplementary Table 1. 
ENCODERSWe employ separate encoders for each electrophysiological modality. For the ACG image encoder, we use a version of the convolutional architecture introduced in (Beau et al., 2025) with 2 layers and Gaussian Error Linear Units (GeLU) (Hendrycks & Gimpel, 2016). For the waveform encoder, we use a 2 layer multilayer perceptron (MLP) with GeLU units. The representation sizes are 200 dimensional and 300 dimensional for the ACG image encoder and the waveform encoder, respectively. We set the projection size to be 512. For details about hyperparameters, see Supplement B.
CONTRASTIVE OBJECTIVEWe utilize the contrastive objective defined in CLIP. Let z acg and z wf be the L2 normalized projections of each modality. For a batch B, the objective is as follows,L = - 1 2|B| |B| i=1 log exp(z acg i • z wfi /τ ) |B| j=1 exp(z acg i • z wfj /τ ) + log exp(z acg i • z wfi /τ ) |B| j=1 exp(z acg j • z wfi /τ ) (1)where τ is a temperature parameter which we fix during training. The objective function encourages the model to correctly match z acg i with its corresponding z wfi , and vice versa, over all other possible pairs in the batch. This loss can easily be extended to more than two modalities including PSTHs.
SINGLE-NEURON AND MULTI-NEURON BRAIN REGION CLASSIFICATIONBrain region classification using electrophysiological datasets is a new problem that requires novel classification schemes. We develop two classification schemes for our evaluation: a single-neuron and multi-neuron classifier. For our single-neuron classifier, we predict the brain area for each neuron independently using its embedding. For our multi-neuron classifier, we predict the brain region for each 20 micron bin along the depth of the probe by ensembling the predictions of nearby neurons within a 60-micron radius (i.e., averaging the logits of the single-neuron model) as shown in Figure 3a (ii). When more than five neurons fall within this range, only the nearest five are selected.  2025)) 0.74 ± 0.00 0.73 ± 0.00 0.74 ± 0.00 0.73 ± 0.00 0.78 ± 0.00 0.79 ± 0.00 VAE (500D rep) 0.76 ± 0.00 0.75 ± 0.00 0.77 ± 0.00 0.77 ± 0.00 0.78 ± 0.00 0.79 ± 0.00 NEMO (500D rep) 0.78 ± 0.01 0.78 ± 0.00 0.80 ± 0.00 0.79 ± 0.00 0.80 ± 0.00 0.80 ± 0.00  2025)) 0.79 ± 0.00 0.78 ± 0.01 0.74 ± 0.01 0.73 ± 0.02 0.82 ± 0.00 0.81 ± 0.00 VAE (500D rep) 0.82 ± 0.00 0.81 ± 0.00 0.82 ± 0.00 0.82 ± 0.00 0.83 ± 0.00 0.83 ± 0.00 NEMO (500D rep) 0.85 ± 0.01 0.85 ± 0.01 0.85± 0.00 0.85 ± 0.00 0.86 ± 0.01 0.86 ± 0.01
EXPERIMENTAL SETUP
BASELINESFor our baselines, we compare to PhysMAP (Lee et al., 2024), a VAE-based method (Beau et al., 2025)), and a fully supervised MLP. For fair comparison, we utilize the same encoder architectures for NEMO and the VAE-based method. We include two versions of the VAE baseline: (1) the latent space (10D) is used to predict cell-type or brain region (from Beau et al. ( 2025)), or (2) the output of the layer before the latent space (500D) is used to predict cell-type or brain region. Although this approach was not proposed in Beau et al. (2025), we find that utilizing the 500D representations before the latent space performed better than using the 10D latent space and also outperformed a VAE trained with a 500D latent space. For the VAEs, we use default hyperparameters from Beau et al.  2024) for all comparisons. For our classification metrics, we utilize the macro-averaged F1 score, calculated as the unweighted mean of F1 scores for each class, and balanced accuracy, which measures average accuracy per class. For additional details about baseline hyperparameters, see Supplement B.
EXPERIMENTSNP Ultra opto-tagged dataset. For the NP Ultra dataset, we pretrain NEMO and the VAE-based method on 8491 unlabelled neurons. This pretraining strategy is important for reducing overfitting to the small quantity of labeled cell-types. To evaluate each model after pretraining, we perform the three evaluation schemes introduced in Section 5.2: freezing + linear classifier, freezing + MLP 0.40 ± 0.01 0.37 ± 0.01 0.41 ± 0.00 0.37 ± 0.00 0.45 ± 0.01 0.43 ± 0.00 NEMO (500D rep) 0.42 ± 0.00 0.40 ± 0.00 0.45 ± 0.01 0.42 ± 0.00 0.47 ± 0.01 0.44 ± 0.01 0.45 ± 0.01 0.42 ± 0.01 0.46 ± 0.00 0.43 ± 0.00 0.51 ± 0.01 0.49 ± 0.01 NEMO (500D rep) 0.48 ± 0.00 0.45 ± 0.00 0.50 ± 0.00 0.48 ± 0.00 0.51 ± 0.00 0.50 ± 0.00 classifier, and full end-to-end finetuning. For PhysMAP, we utilize the anchor alignment technique introduced by Lee et al. (2024). For all methods and evaluation schemes, we perform a 5-fold cross-validation with 10 repeats to evaluate each model.
C4 cerebellum dataset.For the C4 dataset, we pretrain all methods on 3090 unlabelled neurons. To evaluate each model after pretraining, we perform the three evaluation schemes introduced in Section 5.2. For all classifiers, we do not utilize input layer information, nor do we exclude neurons based on a confidence threshold as done in Beau et al. (2025), as we were interested in evaluating the predictiveness of the features directly without additional information. For all methods and evaluation schemes, we perform a 5-fold cross-validation with 10 repeats to evaluate each model.IBL Brain-wide Map. For the IBL dataset, we randomly divide all insertions (i.e., Neuropixels recordings) into a 70-10-20 split to create a training, validation, and test set for each method. We then pretrain NEMO and the VAE-based method on all neurons in the training split. We then perform the three evaluation schemes introduced in Section 5.2. For PhysMAP, we utilize the anchor alignment technique. We train both a single-neuron and multi-neuron classifier using the representations learned by NEMO and the VAE-based method. For PhysMAP, we only evaluate the single-neuron classifier. We compute the average and standard deviation of the metrics using five random seeds.
RESULTS
CLASSIFICATIONNP Ultra cell-type classifier. The results for the NP Ultra opto-tagged dataset are shown in Table 1 andFigure 2. For all three evaluation schemes, NEMO achieves the highest macro-averaged F1 score and balanced accuracy by a significant margin. Notably, its largest improvement is in the linear and frozen MLP evaluations, indicating that NEMO captures cell-type-discriminative features even without fine-tuning. After fine-tuning, all methods are closer in performance, suggesting that there is some saturation for this dataset. These results demonstrate that NEMO is an accurate method for cell-type classification in visual cortical microcircuits even without fine-tuning.C4 cerebellum cell-type classifier. The results for the C4 cerebellum dataset are shown in Table 2 and Supplementary Figure 4. For all evaluation schemes, NEMO outperforms the baseline models, achieving the highest macro-averaged F1 score and balanced accuracy, with the largest gains again in the linear and frozen MLP evaluations. These findings demonstrate that NEMO can accurately classify cell types in the cerebellum without any hyperparameter adjustments.IBL single-neuron region classifier. We then aim to investigate how much relevant information NEMO extracts from each neuron about its anatomical location, i.e., brain region. We investigate this by training classifiers that use single neuron features to identify anatomical regions for the IBL dataset (see Table 3 and Figure 3 for results). The confusion matrix for the VAE, supervised MLP, and PhysMAP are shown in Supplementary Figure 9. We find that NEMO outperforms all other methods using both the linear and MLP-based classification schemes. Without end-to-end fine-tuning, NEMO with an MLP classification head is already on par with the supervised MLP. NEMO's success with both the linear and MLP classifier with frozen encoder weights indicates that NEMO is able to extract a region-discriminative representation of neurons without additional finetuning. This representation can be further improved by fine-tuning NEMO. All methods have closer performance after fine-tuning potentially due to the substantial amount of labeled data.IBL multi-neuron region classifier. We investigate whether combining information from multiple neurons at each location can improve brain region classification. We use the nearest-neurons ensembling approach as described in 4.5 and shown in Figure 3a. Averaging the logits of predictions from single neurons improves classification performance over the single-neuron model. NEMO still has the best region classification performance especially for the linear and frozen MLP evaluations (see Table 4 and Figure 3c for results). Again, all methods have closer performance after fine-tuning.
CLUSTERINGWe next examine the clusterability of NEMO representations for the IBL Brain-wide Map. We followed the clustering strategy used in Lee et al. (2021) by running Louvain clustering on a UMAP graph constructed from the representations extracted by NEMO from the IBL training neurons. We adjusted two main settings: the neighborhood size in UMAP and the resolution in Louvain clustering. We selected these parameters by maximizing the modularity index, which had the effect of minimizing the number of resulting clusters (Figure 4c). The clustering results relative to the region labels are presented in Figures 4a andb. The UMAP visualization of the NEMO represen-  (Wang et al., 2020). The cluster distribution found using NEMO is closely correlated with the anatomical regions and is consistent across insertions from different labs.tations, colored by region label, demonstrates that the regions are separable in the representation space. Notably, there is a distinct separation of thalamic neurons from other regions, along with an isolated cluster of cerebellar neurons. Neurons from other regions are also well organized by region labels within the NEMO representation space, allowing for their clustering into several distinct clusters. Additionally, overlaying the neurons colored by their cluster IDs onto their anatomical locations (Figure 4) reveals a cluster distribution closely correlated with anatomical regions which is consistent across insertions from different labs (Supplementary Figure 11). We find that clustering NEMO's representations leads to a more region-selective clustering than when we use the raw features directly (Supplementary Figures 12 and13). These results demonstrate that NEMO extracts features that capture the electrophysiological diversity across regions even without labels.
ABLATIONSLabel ratio sweep. We assess whether NEMO requires less labeled data for fine-tuning by conducting a label ratio sweep with single-neuron region classifiers. We train both linear and MLP classifiers under two conditions: with frozen weights and full end-to-end fine-tuning, using 1%, 10%, 30%, 50%, 80%, and 100% of the labeled data. Accuracy results are shown in Figure 3d (F1 scores in Supplementary Figure 6). The fine-tuned NEMO model outperforms all other methods across all label ratios. Notably, with only 50% of the training labels, both the linear and fine-tuned NEMO models outperform the corresponding VAE models and the supervised MLP, even when the latter models are trained on the full dataset.Single modality classifier. We examine whether combining modalities improves region-relevant information and if NEMO enhances feature extraction by aligning their embeddings. We compared the classification performance of the MLP classifier with encoder weights frozen and end-to-end fine-tuned, across all models using: 1) waveforms only 2) ACGs only 3) waveforms and ACGs. Brain region classification balanced accuracies are shown in Figure 3e (for F1, see Supplementary Figure 6). We found that bimodal models generally outperform unimodal models, suggesting that combining both modalities provides extra information on the anatomical location of neurons. Once again, NEMO achieves the best performance, demonstrating its ability to enhance single-modality information extraction by leveraging the other modality. After fine-tuning, NEMO and the VAE have closer performance potentially due to the substantial amount of ground-truth labels.Joint vs. independent learning for NEMO. To ablate the importance of learning a shared representation of each modality, we train a version of NEMO where we independently learn an embedding for each modality using a unimodal contrastive method, SimCLR (Chen et al., 2020). The results for brain region classification are shown in Figure 5a where NEMO trained with CLIP outperforms NEMO trained with SimCLR for all label ratios and classification methods. NEMO trained with CLIP is also able to extract more informative representations from each modality as shown in Figure 5b. These results demonstrate that learning a shared representation of the two modalities is important for the downstream performance of NEMO. Supplementary Table 9 and 10 show that joint training with CLIP also leads to an improvement over SimCLR for cell-type classification.
DISCUSSIONIn this work, we proposed NEMO, a pretraining framework for electrophysiological data that utilizes multi-modal contrastive learning. We demonstrate that NEMO is able to extract informative representations for cell-type and brain region classification with minimal fine-tuning across three different datasets. This is especially valuable in neuroscience, where ground truth data, like opto-tagged cells, are costly, labor-intensive, or even impossible to obtain (e.g., in human datasets).Our work has several limitations. First, we focus on shared information between two modalities, assuming this is most informative for identifying cell identity or anatomical location. However, modeling both shared and modality-specific information could further improve performance, as each modality may contain unique features relevant to cell identity or anatomical location (Liu et al., 2024;Liang et al., 2024). Additionally, NEMO utilizes the activity of each neuron independently, which ignores neuron correlations that can help distinguish cell-types (Mi et al., 2023). Extending NEMO to encode population-level features is an exciting future direction.NEMO opens up several promising avenues for future research. Our framework can be adapted for studies of peripheral nervous systems, such as the retina (Wu et al., 2023). NEMO can also be combined with RNA sequencing to find features that are shared between RNA and electrophysiological data (Li et al., 2023). It will also be possible to correlate the cell-types discovered using NEMO with animal behavior to characterize their functional properties. Finally, we imagine that the representations extracted by NEMO can be integrated with current multi-animal pretraining approaches for neural activity to provide additional cell-type information which could improve generalizability to unseen sessions or animals (Azabou et al., 2023;Ye et al., 2023a;Zhang et al., 2025;2024). ing to hold out any for hyperparameter tuning. For the brain region classification experiments, we tune the optimizer, learning rate, model size and dropout using the validation set of insertions.
B.4 SIMCLR-BASED NEMOFor the SimCLR-based NEMO, we randomly apply the same set of augmentation methods to each data point, generating two correlated augmented views. We then train each encoder and a linear projection layer to maximize agreement using contrastive learning. Compared to other methods, we use stronger augmentations for SimCLR. This is because SimCLR focuses on the differences between augmentations from the same data point, whereas CLIP-based learning strategies compare augmentations across different modalities. Stronger augmentations improved SimCLR's performance.Both methods use contrastive learning to maximize similarity between augmented views of the same neuron, while keeping views of different neurons distinct. The main difference between the SimCLR-based method and the CLIP-based method is that CLIP is multimodal and SimCLR is unimodal. For the SimCLR-based method, we use the contrastive objective from (Chen et al., 2020). Let z view1 and z view2 be the normalized projections of two augmented views from the same modality. For a batch B, the objective is as follows:L = - 1 2|B| |B| i=1 [log exp(z view1i • z view2i /τ ) |B| j=1 1 {j̸ =i} exp(z view1i • z view2j /τ ) + |B| j=1 1 {j̸ =i} exp(z view1i • z view1j /τ ) + log exp(z view2i • z view1i /τ ) |B| j=1 1 {j̸ =i} exp(z view2i • z view1j /τ ) + |B| j=1 1 {j̸ =i} exp(z view2i • z view2j /τ ) ](2)For SimCLR, we use the same types of augmentation as CLIP with increased strength: for the EAPs, we applied Gaussian noise with standard deviation 1 with probability 0.5, rather 0.1 standard with a probability of than a 0.3. For the ACG images, we keep the augmentation methods consistent across all models.In our SimCLR-based method, we use the pretrained encoder to obtain separate embeddings for each modality, which are then combined to train downstream tasks such as cell-type and brain region classification.C REMOVING STIMULATION ARTIFACTS FROM THE NP ULTRA DATA SETThe optotagging experiments for the Neuropixels Ultra dataset included two distinct photostimulation patterns: a 10 ms square wave pulse and a 1 s raised cosine ramp, each delivered at one of three light intensities (0.2, 4.1, and 10.0 mW/mm 2 ), randomly interleaved. The average inter-trial interval was 2 s. To eliminate stimulus-induced effects, we excluded spikes occurring within 1100 ms of each stimulus onset and computed ACG images using only the remaining data. The ACG images followed the approach in (Beau et al., 2021), with one modification: we normalized each bin's value solely by the number of spikes whose time lag around that bin's spiking time did not overlap with any stimulus period (i.e., the 1100 ms post-stimulus window). This adjustment mitigates edge effects introduced by blank periods during stimulation.
D DATASET SPLIT AND VALIDATION STRATEGYGiven the limited quantity of ground-truth labels for the NP Ultra dataset and the C4 cerebellum dataset, we evaluate the performance of each model using a 5-fold cross-validation of the labeled cells with 10 repeats. Since we do not have a separate validation set while training NEMO, we utilize a nested cross-validation approach to choose an evaluation checkpoint for NEMO. In other words, for each cross-validation fold, we perform a nested 5-fold cross-validation on the training folds with a linear classifier to choose the best checkpoint for NEMO. We then use this NEMO checkpoint to perform the evaluation on the heldout fold of the original 5-fold cross-validation. This checkpoint choosing procedure is done only on the training folds and does not use any information from the testing fold. Figure 1 :1Figure 1: Schematic illustration of NEMO. (a) Neuropixels Ultra (Ye et al., 2023b) recordings capture activity from many different cell-types which have distinct extracellular action potentials (EAPs) and spiking activity. We present waveform and spiking activity snippets from five example neurons for each cell-type. (b) We transform the spiking activity of each neuron into a compact autocorrelogram (ACG) image from (Beau et al., 2025) that accounts for variations in the firing rate (see Section 4.1) (c) NEMO utilizes a CLIP-based objective where an EAP encoder and an ACG image encoder are trained to embed randomly augmented EAPs and ACG image from the same neuron close together while keeping different neurons separate. The learned representations can be utilized for downstream tasks such as cell-type and brain-region classification.
Figure 2 :2Figure 2: Comparing NEMO to baseline models on the NP Ultra opto-tagged dataset. (a) UMAP visualization of the pretrained NEMO representations of unseen opto-tagged visual cortex units, colored by different cell-types. Neurons of the same class form clusters, particularly when combined modalities are used. (b) Balanced accuracy and (c) Confusion matrices for the NP Ultra classification results, normalized by ground truth label and averaged across 5 random seeds. NEMO outperforms the other embedding methods by a significant margin across all cell-types and evaluation methods.
(2025)  (see Supplement N for a hyperparameter sensitivity analysis). For the supervised baseline, we again use the same encoder architectures as NEMO. For training NEMO, we use an early stopping strategy which utilizes validation data. For the VAE-based method, we use the training scheme introduced inBeau et al. (2025). We fix the hyperparameters for all methods across all datasets. For more details about baselines, training, and hyperparameters, see Supplements B and D.5.2 EVALUATIONFor both NEMO and the VAE-based method, the representations from the ACG image and EAPs are concatenated together before classification or fine-tuning. We apply three classification schemes for evaluation including (1) freezing the model and training a linear classifier on the final-layer outputs, (2) freezing the model and training a MLP-based classifier on the final-layer outputs, (3) fine-tuning both the original model and a MLP-based classifier on the final layer. To ensure balanced training data, we implement dataset resampling prior to fitting the linear classifier. For PhysMAP comparisons, we utilize the weighted graph alignment approach provided inLee et al. (
Figure 3 :3Figure 3: Results for NEMO on the IBL brain region classification task. (a) Schematic for multi-neuron classifier. (i) At each depth, the neurons within 60 µm were used to classify the anatomical region. Only the nearest 5 neurons were selected if there were more than 5 neurons within that range. (ii) For logits averaging, single-neuron classifier logits are predicted using a linear model/MLP trained on the representations of our two physiological modalities. The final prediction is based on the average of the individual logits. (b) Confusion matrices for the single-neuron region classifier for fine-tuned NEMO. (c) Confusion matrices for the NEMO multi-neuron region classifier, averaged across 5 runs. (d) Single neuron balanced accuracy with linear classifier and the MLP head for each model trained/fine-tuned with different label ratios. (e) Single-neuron MLP-classification balanced accuracy for each modality separately and for the combined representation.
Figure 4 :4Figure 4: IBL neuron clustering using NEMO pretraining. (a) A UMAP visualization of the representations that NEMO extracts from the training data colored by anatomical brain region. (b) The same UMAP as shown in (a) but instead colored by cluster labels using a graph-based approach (Louvain clustering). (c) We tuned the neighborhood size in UMAP and the resolution for the clustering. These parameters were selected by maximizing the modularity index which minimized the number of clusters. (d) 2D brain slices across three brain views with the location of individual neurons colored using the cluster IDs shown in (b). The black lines show the region boundaries of the Allen mouse atlas(Wang et al., 2020). The cluster distribution found using NEMO is closely correlated with the anatomical regions and is consistent across insertions from different labs.
Figure 5 :5Figure 5: Ablating joint vs. independent learning for NEMO. To evaluate the importance of learning a shared representation between modalities, we train a version of NEMO on the IBL brain classification task where each modality is independently embedded using SimCLR. (a) Across all label ratios and classifiers, we find that NEMO trained with CLIP outperforms the SimCLR version. (b) NEMO trained with CLIP also extracts more informative representations for each modality than when training with SimCLR.
For the IBL dataset, we use a standard 70-10-20 split for the training, validation, and test sets, respectively. During training, we monitor the performance of the model using a linear classifier













Table 1 :1Cell-type classification for the NP Ultra dataset. 5-Fold accuracy and F1-scores are reported for three conditions: (i) a linear layer and (ii) MLP on top of the frozen pretrained representations, and (iii) after MLP finetuning. Chance level is 0.33 for this dataset.ModelLinearMLPMLP fine-tunedAccF1AccF1AccF1SupervisedN/AN/AN/AN/A0.79 ± 0.00 0.78 ± 0.00PhysMAP (Lee et al. (2024))0.52 10.52 1N/AN/AN/AN/AVAE (10D latent; Beau et al. (
Table 2 :2Cell-type classification for the C4 cerebellum dataset. 5-Fold accuracy and F1-scores are reported for three conditions: (i) a linear layer and (ii) MLP on top of the frozen pretrained representations, and (iii) after MLP finetuning. Chance level is 0.20 for this dataset.ModelLinearMLP (5-fold)Finetuned MLP (5-fold)AccF1AccF1AccF1SupervisedN/AN/AN/AN/A0.82 ± 0.00 0.82 ± 0.00PhysMAP0.51 10.49 1N/AN/AN/AN/AVAE (10D latent; Beau et al. (
Table 3 :3Single-neuron brain region classification for the IBL dataset. The accuracy and F1-scores are reported for three conditions: (i) a linear layer and (ii) MLP on top of the frozen pretrained representations, and (iii) after MLP finetuning. Chance level is 0.10 for this dataset.ModelLinearMLPMLP fine-tunedAccF1AccF1AccF1SupervisedN/AN/AN/AN/A0.45 ± 0.01 0.42 ± 0.01PhysMAP0.31 10.27 1N/AN/AN/AN/AVAE (500D rep)
Table 4 :4Multi-neuron brain region classification for the IBL dataset. The accuracy and F1-scores are reported for three conditions: (i) a linear layer and (ii) MLP on top of the frozen pretrained representations, and (iii) after MLP finetuning. Chance level is 0.10 for this dataset.ModelLinearMLPMLP fine-tunedAccF1AccF1AccF1SupervisedN/AN/AN/AN/A0.50 ± 0.00 0.48 ± 0.01VAE (500D rep)
			We utilize PhysMAP's anchor alignment technique (which is deterministic) to evaluate its performance.