Self supervised learning for in vivo localization of microelectrode arrays using raw local field potential

Tianxiao He, Malhar Patel, Chenyi Li, Anna Maslarova, Mihály Vöröslakos, Nalini Ramanathan, Wei-Lun Hung, Gyorgy Buzsaki, Erdem VarolNeurIPS 2025

Accurate anatomical localization of neural probes is a fundamental requirement in both systems neuroscience and clinical applications like Deep Brain Stimulation (DBS). However, determining exactly where electrodes are situated within the brain remains a significant challenge. To address this, researchers have developed Lfp2vec, a novel self-supervised learning framework capable of identifying the anatomical location of a neural probe in real-time simply by "listening" to raw local field potential (LFP) signals.

The Challenge of Probe Localization

Currently, researchers and clinicians rely heavily on pre-operative brain atlases, MRI scans, and post-operative histology to determine electrode placement. These traditional methods have major drawbacks: they are labor-intensive, cannot account for dynamic brain shifts or the bending of flexible probes during insertion, and crucially, they do not provide real-time feedback.

While some recent approaches have attempted to use individual neuron firings ("spikes") for localization, spike sorting is computationally expensive, error-prone, and highly dependent on signal quality. By contrast, the Local Field Potential (LFP)—the low-frequency, aggregate electrical signal of a neural population—offers a more robust and computationally accessible "GPS" for neural probes in vivo.

The Lfp2vec Framework

To harness the anatomical information embedded in LFP signals, the authors introduce Lfp2vec, which ingeniously adapts the popular wav2vec 2.0 architecture—originally designed for speech recognition—to the domain of electrophysiology.

Overview of the Lfp2vec framework, illustrating the diverse datasets, pretraining architecture, learned representations, and downstream decoding tasks.

The methodology relies on several key innovations:

  1. Cross-Modal Initialization: Rather than training a model from scratch, the researchers initialized Lfp2vec with weights from an audio-pretrained transformer. They hypothesized that the fundamental time-series structure of audio shares useful, transferable features with neural signals.
  2. Self-Supervised Pretraining: The model undergoes training on a massive corpus of unlabeled LFP data using a masked-prediction task. By learning to predict "missing" parts of a signal based on surrounding context, the model effectively learns the underlying "language" of the brain.
  3. Fine-Tuning and Post-Processing: A lightweight classification head maps the learned embeddings to specific anatomical regions (e.g., CA1, Dentate Gyrus, Cortex). To ensure biological plausibility, temporal smoothing (averaging predictions over time) and spatial smoothing (ensuring adjacent channels report similar regions) are applied.

Key Results and Generalization

The study evaluated Lfp2vec across four diverse datasets, including Neuropixels recordings from mice (IBL and Allen datasets), high-density SiNAPs recordings from mice (including an Alzheimer's model), and Neuropixels-NHP recordings from macaques.

Performance comparisons showing Lfp2vec's superior accuracy, distinct anatomical clustering, and strong zero-shot/one-shot generalization capabilities across different labs.

The framework demonstrated remarkable capabilities:

  • Audio Foundation is Highly Effective: Initializing with audio-pretrained weights provided a massive performance boost. A model with only 6,000 trials of LFP pretraining (starting from audio) matched the performance of a randomly initialized model trained on 400,000 trials.
  • Superior Accuracy and Clustering: Lfp2vec consistently outperformed standard baselines (like spectrograms) and state-of-the-art self-supervised models (such as BrainBERT and SimCLR). The raw LFP signal contains a distinct anatomical "fingerprint," evidenced by Lfp2vec's Silhouette score of 0.576 (compared to BrainBERT's 0.146), indicating highly distinct and coherent anatomical clustering.
  • Zero-Shot Generalization: The model exhibited an impressive ability to generalize across different environments. It could be trained on data from one laboratory using a specific probe and accurately predict anatomical regions in data from a completely different lab using different hardware and behavioral tasks.
  • Cross-Species and Functional Success: Lfp2vec successfully transferred from rodent data to macaque data, accurately delineating motor-related regions like the Primary Motor Cortex (M1) and Basal Ganglia (BG). Furthermore, the same representations used for localization successfully classified Alzheimer's versus healthy mice with minimal extra training.

Future Directions

While Lfp2vec establishes a powerful foundation for decoding raw LFP, the authors note several areas for future development. The current study focused heavily on the cortex and hippocampus; future work must validate the model on deeper, more heterogeneous brain structures. Additionally, the model is currently sensitive to specific preprocessing steps like noise removal.

Ultimately, the goal is to adapt this pipeline for true streaming, closed-loop feedback during surgery, and to validate these findings in larger human clinical studies to aid in procedures like DBS electrode placement.

Summary updated

BibTeX
@inproceedings{he2025self,
  author = {Tianxiao He and Malhar Patel and Chenyi Li and Anna Maslarova and Mihály Vöröslakos and Nalini Ramanathan and Wei-Lun Hung and Gyorgy Buzsaki and Erdem Varol},
  title = {{Self supervised learning for in vivo localization of microelectrode arrays using raw local field potential}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=96liIPUPXG},
}
Figure