LFPformer: Geometry-Aware Self-Supervised Electrophysiology Representation Learning

Subhrajit Dey, Ping-Jung Lu, Visweswar Sirish Parupudi, Malhar Patel, Margaret-Estefani Conde Paredes, Mihály Vöröslakos, Anna Maslarova, Gyorgy Buzsaki, Saurabh Vyas, Erdem VarolNeurIPS 2026

TL;DR

Knowing where an electrode is inside a living brain usually requires slicing and staining brain tissue after an experiment is completely over. LFPformer shows that we can estimate an electrode's 3D anatomical coordinates directly from the raw electrical "hum" of neural populations—by teaching an audio foundation model to understand the physical geometry of the recording probe itself.

What Problem Does This Paper Address?

When neuroscientists implant microelectrode arrays into the brain, they record two main flavours of electrical activity: fast "spikes" (individual neurons firing) and slower Local Field Potentials (LFPs)—the collective, ambient electrical hum of thousands of nearby synapses and dendrites.

While recent neural foundation models have focused heavily on spikes, LFPs are arguably more stable and easier to record, especially when individual spikes are hard to detect. However, LFPs are notoriously tricky to interpret anatomically because electrical fields travel through tissue, blurring their exact origin. Furthermore, figuring out where your electrodes actually landed in the brain traditionally relies on histology—examining physical tissue slices under a microscope post-mortem. For long-term implants or human clinical settings (like deep brain stimulation), waiting until the end isn't ideal. Can a self-supervised model learn universal, anatomically meaningful representations from raw LFP waveforms without needing histological labels during pretraining?

Methods

LFPformer adapts wav2vec 2.0—a self-supervised model originally built for human speech—to read 3-second, single-channel LFP chunks. In a clever engineering trick, the authors upsample the 1,250 Hz brain signals to 16 kHz via sinc interpolation so the audio-pretrained convolutional filters can operate right in their native temporal sweet spot without discarding pretrained knowledge.

Figure 1: LFPformer learns where a recording site is from its LFP alone. (a) We pretrain on mouse Neuropixels recordings (IBL, Allen) and test transfer to new subjects, a new probe technology (NeuroNexus) and a new species (macaque). Bars show the held-out splits; probes are coloured by brain region based on Allen CCF. (b) Each 3s, single-channel LFP chunk is encoded by a wav2vec 2.0 model trained to predict masked frames (MaskPred). On its own, this objective does not separate brain regions in the embedding. (c) We therefore add one geometry-aware contrastive loss, which pulls together chunks recorded close in space and pushes apart distant ones (target similarity exp(−d2/2σ2), σ = 0.5 mm). The three variants differ only in where the distance comes from: the probe’s own channel layout (ChanDistc), the surgical micromanipulator log (ManipDistc), or histology (CCFDistc, oracle). (d) With these losses, held-out IBL embeddings organise by anatomy: cortex, hippocampus, thalamus and midbrain separate along the principal axes. (e) At test time a readout predicts a position and uncertainty for every chunk. Pooling chunks per channel (weighted by 1/σ2) and rigidly fitting the known probe geometry (Kabsch) turns this scattered cloud into a probe track that follows histology.

Standard wav2vec 2.0 learns by masking out snippets of time and predicting them (MaskPred). On its own, this temporal puzzle fails to separate brain regions. What’s new here is augmenting MaskPred with a geometry-aware contrastive loss that pulls embeddings of spatially close channels together and pushes distant ones apart, using free metadata available at recording time:

  • ChanDistc: Uses the known, manufactured spacing between recording sites on the same silicon probe (e.g., 20 µm rows).
  • ManipDistc: Estimates 3D distances across probes using the surgical micromanipulator logs (insertion entry point, angle, and depth).
  • (For comparison, they also test an oracle, CCFDistc, which peeks at ground-truth histological coordinates).

At test time, a supervised readout (Linear, MLP, or probe-level Transformer) predicts 3D coordinates and uncertainty ($\sigma$) for each 3-second chunk. Finally, an inference-time refinement step pools predictions per channel (weighted by inverse variance, $1/\sigma^2$) and uses Kabsch alignment to rigidly snap the known physical probe shape onto the noisy point cloud of predictions—no test-set brain coordinates required.

Datasets

The authors pretrain and evaluate across subject-disjoint splits spanning laboratories, probe technologies, and species:

  • Allen Brain Observatory (Visual Coding): Neuropixels 1.0 recordings from 58 mice covering 116 brain regions.
  • IBL Brain-Wide Map: Cross-laboratory Neuropixels recordings from 139 mice across 12 institutions, spanning 309 brain regions.
  • NeuroNexus Benchmark: A 5-class mouse dataset used to test transfer to a completely different probe hardware design.
  • Macaque Prefrontal Recordings: Recordings from two monkeys (adapting on Monkey A, testing on Monkey B) to test cross-species generalization.

Key Insights and Ideas

  • Free physical geometry unlocks anatomy: You don't need tedious microscope tissue-tracing during pretraining to organize brain signals. Simply knowing which channels are neighbours on a piece of silicon (ChanDistc) or reading surgical motor logs (ManipDistc) forces the embedding space to spontaneously organize into cortex, hippocampus, thalamus, and midbrain. When paired with a Transformer readout, these label-free pretraining methods nearly match the histology-supervised oracle!
  • Simpler local physics transfers better: While surgical manipulator logs (ManipDistc) give better 3D localization on the source dataset, simple within-probe channel spacing (ChanDistc) transfers better to new datasets and different probe hardware (NeuroNexus). Relying purely on relative distances along a probe likely prevents the model from overfitting to dataset-specific surgical trajectories.
  • Bigger encoders aren't automatically better: Scaling from a Base (95.1M parameters) to a Large (317.5M parameters) wav2vec 2.0 encoder didn't consistently improve localization within their training budget (up to ~59 million chunks), suggesting data diversity matters more than raw parameter count right now.
  • The model learns neurophysiologically real rhythms: Canonical correlation analysis shows LFPformer isn't memorizing weird artifacts—its latent axes cleanly map onto classical spectral signatures (contrasting low-frequency rhythms against broadband and high-gamma power above 200 Hz).

Key Results

LFPformer consistently beats supervised deep learning baselines (AnyNet, Vision Transformers on spectrograms) and classical spectral decoders (HistGBM, Ridge, kNN).

  • 3D Localization (IBL): Using LFP alone, LFPformer with a Transformer readout achieves a per-probe 3D Root Mean Square Error (RMSE) of 1012 ± 567 µm, outperforming AnyNet (1484 µm), ViT (1576 µm), and standard audio-pretrained wav2vec 2.0 (1796 µm).
  • Fusing Signals + Surgical Logs: Combining LFPformer features with micromanipulator coordinates drops error to 710 ± 428 µm, improving over surgical micromanipulator logs alone (790 ± 457 µm).
  • Cross-Probe Transfer (NeuroNexus): Fine-tuned ChanDistc hits 0.634 ± 0.089 balanced accuracy across 5 brain regions, beating AnyNet (0.550) and ViT (0.527)—and even reaches 0.570 when the encoder is kept completely frozen.

Limitations and Future Work

Don't throw away the lab microscope just yet. Even the best combined error of ~710 µm (roughly 0.7 millimeters) is still too coarse to pinpoint tiny brain nuclei or sharp laminar boundaries in a mouse brain. Furthermore, while pretraining is self-supervised, the downstream coordinate readout still requires anatomical training labels, and cross-species macaque validation was limited to just two animals. Future work aims to fuse LFPs with action potential spikes, species-specific atlases, and richer surgical metadata to push accuracy toward clinical-grade real-time feedback—and explore whether these geometry-aware embeddings also boost behavioral decoding.

Summary updated

Abstract

Local field potentials (LFPs) capture neural population activity, motivating transferable representations for interpreting brain recordings. We introduce LFPformer, a self-supervised framework that learns geometry-aware representations of single-channel LFPs using probe geometry and insertion coordinates recorded at acquisition time. We augment the standard wav2vec\~2.0 pretraining objective with spatial relationships derived from channel spacing and estimated insertion trajectories, without requiring histological coordinates during pretraining. We evaluate representation quality through three-dimensional coordinate regression and brain-region classification. Precise electrode localization underpins the interpretation of extracellular recordings, but conventional histology is labor-intensive and verifies chronic implants only after experiments end. Using wav2vec\~2.0 as the main backbone, we compare against supervised baselines (AnyNet, ViT, and classical spectral classifiers) across datasets, laboratories, species, and probe technologies. Geometry-aware representations improve localization relative to the standard wav2vec\~2.0 objective, with Transformer readouts strengthening LFP-only performance and insertion metadata providing further gains. Scaling and spectral analyses characterize the effects of training exposure and frequency-dependent information in the embeddings. These findings support scalable LFP representation learning, although localization errors remain too large to replace histology. Project page:https://www.neuroinformaticslab.com/lfpformer
BibTeX
@inproceedings{dey2026lfpformer,
  author = {Subhrajit Dey and Ping-Jung Lu and Visweswar Sirish Parupudi and Malhar Patel and Margaret-Estefani Conde Paredes and Mihály Vöröslakos and Anna Maslarova and Gyorgy Buzsaki and Saurabh Vyas and Erdem Varol},
  title = {{LFPformer: Geometry-Aware Self-Supervised Electrophysiology Representation Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=hEiyAXz4A8},
}
Figure