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 Varol
Recent advances in large-scale neural recordings have enabled accurate decoding of behavior and cognitive states, yet decoding anatomical regions remains underexplored, despite being crucial for consistent targeting in multiday recordings and effective deep brain stimulation. Current approaches typically rely on external anatomical information, from atlas-based planning to post hoc histology, which are limited in precision, longitudinal applicability, and real-time feedback. In this work, we develop a self-supervised learning framework, termed \textbf{Lfp2vec}, to infer anatomical regions from the neural signal in vivo. Instead of relying on handcrafted features and extensive preprocessing, we adapt a transformer-based model from the audio domain to embed the Local Field Potential (LFP) signals of individual channels and fine-tune it for downstream decoding of hippocampal sublayers. We demonstrate that our method generalizes across subjects, probe geometries, and lab conditions, achieving strong zero-shot performance and outperforming state-of-the-art self-supervised models on electrophysiology data. The learned embeddings cluster by brain region and generalize to different downstream tasks with minimal fine-tuning. Altogether, our approach enables zero-shot prediction of brain regions in novel subjects, demonstrates that LFP signals encode rich anatomical information, and establishes self-supervised learning on raw LFP as a foundation to learn representations that can be tuned for diverse neural decoding tasks. Code to reproduce our results are found in the anonymous repository at https://anonymous.4open.science/r/lfp2vec-AF87.