Research
Know Thyself by Knowing Others: Learning Neuron Identity from Population Context
Overview Research area: Machine learning for neuroscience — self-supervised representation learning on neural population activity (electrophysiology and calcium imaging). Technical level: Intermediate
- arXiv
- 2512.01199
- Published
- 2025-12-01
- Authors
- Vinam Arora, Divyansha Lachi, Ian J. Knight, Mehdi Azabou, Blake Richards, Cole L. Hurwitz, Josh Siegle, Eva L. Dyer
AI summary
Overview
Research area: Machine learning for neuroscience — self-supervised representation learning on neural population activity (electrophysiology and calcium imaging).
Technical level: Intermediate to Advanced. Readers should be comfortable with transformer architectures, contrastive learning (SimCLR-style objectives), and basic systems neuroscience concepts such as cell type and brain region.
Scope: The paper introduces NuCLR, a self-supervised framework that learns a representation for each individual neuron by leveraging the context of the surrounding population, enabling generalizable zero-shot decoding of cell type and brain region.
What This Paper Is About
Neurons differ from one another in ways shaped by their cell type, connectivity, and the brain region they sit in, but these properties are expensive to measure directly — and in humans and non-human primates, largely inaccessible with current molecular tools. The paper asks whether a neuron's identity can instead be inferred from its activity, provided you look at that activity in the context of the whole recorded population. NuCLR is the proposed answer: a self-supervised model that produces one vector per neuron, trained so that the same neuron looks similar across different moments and stimuli while remaining distinguishable from its neighbors.
Key Contributions
-
NuCLR framework: A self-supervised, neuron-level representation learning method that combines contrastive learning over temporal views with a spatiotemporal transformer that integrates population context without assuming any fixed neuron ordering.
-
State-of-the-art transfer results: Across electrophysiology datasets (Allen Visual Coding Neuropixels, IBL Brain-wide Map, Steinmetz et al.) and a calcium imaging dataset (Bugeon et al.), linear probes on frozen NuCLR representations set new records for both cell type and brain region decoding.
-
Zero-shot generalization: A single pretrained model transfers to entirely unseen sessions and animals without retraining or additional metadata, outperforming baselines by large margins (e.g., +0.29 macro F1 over the next best method on inductive zero-shot cell type decoding).
-
First scaling analysis for neuron-level representations: Systematically shows that adding more animals to pretraining consistently improves downstream zero-shot accuracy, and that doubling unlabeled pretraining data can beat doubling labeled data — while also demonstrating strong label efficiency.
Main Findings
-
Population context is essential: Ablating the spatial attention layers (replacing them with extra temporal layers to match parameter count) drops Allen VC cell type F1 from 0.72 to 0.55 and IBL brain region F1 from 0.53 to 0.36. Even this crippled variant still beats most baselines, but the gap shows that neighbor activity carries information a single neuron's own spike train does not.
-
Strong zero-shot transfer across animals: On Allen VC, NuCLR reaches 0.7218 macro F1 in transductive zero-shot and 0.7200 in inductive zero-shot cell type decoding, versus ~0.42 for NEMO and ~0.40 for NeuPRINT. On IBL brain region decoding, NuCLR hits 0.53 inductive zero-shot versus 0.38 for NEMO.
-
Consistent wins on calcium imaging too: On the Bugeon dataset, NuCLR leads on E vs. I classification (0.6738 inductive zero-shot) and on the harder five-way inhibitory subclass task (0.3938 inductive zero-shot), where LOLCAT falls to 0.2418.
-
Extreme label efficiency: Using only 12.5% of labeled neurons to train the classifier, NuCLR still scores 0.54 on Allen VC and 0.50 on IBL — beating every baseline trained on 100% of labels.
-
Scaling with unlabeled data works: Zero-shot performance improves steadily as more animals are added to pretraining. In several cases, doubling the unlabeled pretraining corpus helps more than doubling the supervised label budget.
-
Neuron dropout matters selectively: Randomly masking up to 50% of neurons per view improves Allen VC cell type decoding (0.62 → 0.72) but has little effect on IBL, which the authors attribute to IBL's much larger pretraining set (600+ populations vs. 42).
-
Permutation-equivariant design is deliberate: Spatial attention uses no positional embeddings, and negatives are confined to neurons recorded on the same probe, preventing the model from clustering neurons by recording hardware rather than biology.
Methodology in Plain English
The approach rests on two intuitions: a neuron's identity depends on the company it keeps, and that identity does not change over time.
Architecture. Spike trains from a population of neurons are binned into short time windows and grouped into patches. Each neuron's patch sequence is first processed on its own by temporal transformer layers, producing a time-aware encoding of that neuron's internal dynamics. Then alternating spatial and temporal attention layers let neurons exchange information at each timepoint and propagate what they learn back across time. Spatial attention treats the population as an unordered set — no positional embeddings — so the model works for populations of any size and any ordering. A final mean-pool over time yields one fixed-dimensional vector per neuron.
Training objective. Two windows of activity are sampled from the same recording within a short time gap. Each window is independently subjected to neuron dropout (up to 50% of neurons removed). Both are encoded, and a contrastive loss pulls the representations of the same neuron in the two views together while pushing apart representations of different neurons in the same population. Because dropout removes different neurons in each view, only the surviving overlap contributes positive pairs. The loss is a decoupled contrastive formulation: positive-pair similarity terms are excluded from the denominator, which helps in the low-negative-count regime that arises from computing the loss within a single recording rather than across the minibatch.
Evaluation. After unsupervised pretraining, the encoder is frozen. Each neuron's representation is computed by averaging outputs across sampled windows. A linear classifier is trained on top for two tasks — cell type and brain region — under three increasingly strict settings: transductive (test populations seen, partial labels used), transductive zero-shot (test populations seen, no labels used), and inductive zero-shot (test populations and animals entirely unseen). The inductive setting is the most demanding and the most practically relevant.
Why This Matters
This work offers a path around a long-standing bottleneck in neuroscience: molecular and anatomical tools for identifying neuron types are slow, sparse, and unavailable in humans and non-human primates. If identity can be read out from activity alone, then decades of existing electrophysiology recordings — often collected without any cell type labels — become far more informative.
Real-world applications:
-
Closed-loop brain stimulation: Knowing a neuron's subtype in real time enables stimulation protocols that target disease-relevant cell populations, which the paper cites as a motivation. NuCLR's zero-shot operation on unseen animals is a prerequisite for that.
-
Neurodegenerative disease research: Selective vulnerability of particular neuronal subtypes is a feature of many disorders. Rapid, activity-based subtype identification in animal models could accelerate studies of which cells degenerate and why.
-
Translational and human neuroscience: Where genetic labeling is impossible, activity-derived identity estimates may be the only practical way to compare cell-type-level circuitry between species.
-
Large-scale neural data pipelines: Research consortia and data platforms that aggregate recordings from many laboratories could use a pretrained NuCLR encoder to annotate new sessions out of the box, without per-session retraining.
Industry relevance: Brain-computer interface developers need to generalize decoders across subjects and sessions; pharmaceutical neuroscience programs need scalable phenotypic readouts; and AI-for-science groups gain a demonstration that self-supervised scaling laws, previously established in vision and language, carry over to neural population data when the right invariances are built in.
Future Directions
-
Closing the gap between activity-derived identity and ground truth: NuCLR's embeddings predict cell type and brain region, but it remains open how much connectivity, projection class, or molecular identity the representation actually captures beyond those coarse labels.
-
Extending to human and non-human primate data: These are precisely the settings where molecular tools are missing and where activity-based inference would matter most, but the paper's datasets are rodent.
-
Unifying electrophysiology and calcium imaging: The model handles both with modest modifications, but a genuinely shared representation across modalities — and across brain regions and species — is not yet demonstrated.
-
Scaling further: The paper shows gains from adding animals but does not approach the scale of modern foundation models. Whether those scaling trends continue across thousands of animals, and at what point diminishing returns set in, is unresolved.
-
Interpretability and downstream use: Making the learned identity features legible to neuroscientists, and integrating them into closed-loop or online experimental systems, are natural next steps beyond linear-probe benchmarking.
Target Audience
This paper is most useful to machine learning researchers working on self-supervised representation learning and biological sequence/neural time-series modeling; computational neuroscientists who analyze large electrophysiology or calcium imaging datasets; and practitioners in neurotechnology or neuro-adjacent industry who need decoders that transfer across subjects without retraining. Neuroscientists focused on cell type taxonomy or circuit function will find the benchmark results and zero-shot analysis directly actionable, particularly given the released code at github.com/nerdslab/nuclr.
Authors’ abstract
Neurons process information in ways that depend on their cell type, connectivity, and the brain region in which they are embedded. However, inferring these factors from neural activity remains a significant challenge. To build general-purpose representations that allow for resolving information about a neuron's identity, we introduce NuCLR, a self-supervised framework that aims to learn representations of neural activity that allow for differentiating one neuron from the rest. NuCLR brings together views of the same neuron observed at different times and across different stimuli and uses a contrastive objective to pull these representations together. To capture population context without assuming any fixed neuron ordering, we build a spatiotemporal transformer that integrates activity in a permutation-equivariant manner. Across multiple electrophysiology and calcium imaging datasets, a linear decoding evaluation on top of NuCLR representations achieves a new state-of-the-art for both cell type and brain region decoding tasks, and demonstrates strong zero-shot generalization to unseen animals. We present the first systematic scaling analysis for neuron-level representation learning, showing that increasing the number of animals used during pretraining consistently improves downstream performance. The learned representations are also label-efficient, requiring only a small fraction of labeled samples to achieve competitive performance. These results highlight how large, diverse neural datasets enable models to recover information about neuron identity that generalize across animals. Code is available at https://github.com/nerdslab/nuclr.