SPERA: An EEG Foundation Model with Spherical Priors That Reshapes Brain Signal Representation Learning

SPERA uses spherical geometry priors and latent-space prediction to build a universal, cross-device EEG foundation model.
SPERA is a general-purpose pretrained foundation model for EEG signals with two core innovations: it replaces traditional raw signal reconstruction with Joint-Embedding Predictive Architecture (JEPA) to learn representations in latent space, avoiding wasted capacity on non-neural artifacts; and it incorporates Legendre polynomial-based spherical spatial priors that explicitly encode 3D scalp electrode geometry into the attention mechanism, enabling one model to adapt to diverse electrode montages. Combined with spatiotemporal decomposed attention and a relational spectral regularizer, SPERA was pretrained on ~80,000 hours of EEG from 106 datasets covering 29,048 subjects, achieving the highest average balanced accuracy across nine downstream tasks spanning clinical, cognitive, and BCI domains.
Electroencephalography (EEG), as a non-invasive method for monitoring neural activity, has long played a critical role in clinical diagnosis, cognitive research, and brain-computer interfaces (BCI). Yet building a general-purpose EEG model has always faced a fundamental challenge: the enormous heterogeneity across subjects, recording devices, and electrode configurations makes it extremely difficult to transfer models across scenarios. The SPERA model, introduced in a newly published arXiv paper, attempts to systematically address this problem at the architectural level.
Limitations of Existing EEG Foundation Models
Most mainstream EEG foundation models rely on reconstruction-based pretraining objectives — training the model to restore observed raw signals. While this approach seems straightforward, it has a fundamental flaw: raw EEG signals contain not only genuinely valuable neural components, but also a large amount of non-neural artifacts (such as EMG, eye movements, power line interference, etc.). When a model is required to reconstruct raw waveforms point-by-point, it must spend considerable representational capacity fitting noise unrelated to neural activity, ultimately diluting what it learns about true brain activity patterns.

Furthermore, EEG recording inherently occurs on a spherical surface (the scalp), and electrode geometry varies across devices. Traditional methods typically treat electrodes as a one-dimensional sequence or a fixed grid, ignoring the true spatial relationships of electrodes on the three-dimensional sphere. This further limits the model's ability to generalize across devices and montages.
SPERA's Core Design Philosophy
The name SPERA (Spherical Prior EEG Representation Architecture) already hints at its two defining characteristics: spherical priors and representation architecture. Rather than performing reconstruction on observed signals, SPERA adopts a Joint-Embedding Predictive Architecture (JEPA) to perform prediction in latent space.
This shift is significant. The JEPA paradigm has demonstrated powerful capabilities in visual self-supervised learning in recent years. Its core idea is that the model does not reconstruct inputs sample-by-sample (or pixel-by-pixel), but instead predicts the representation of a target in an abstract latent space. For EEG, this means the model can bypass rigid artifact fitting and focus directly on the semantic structure of neural signals — learning cleaner, more transferable representations.
Legendre Polynomial Spatial Priors
One of SPERA's standout features is the incorporation of a Legendre polynomial-based spatial prior integrated into the attention mechanism. Scalp electrodes are distributed across an approximately spherical surface, and Legendre polynomials are the natural basis for expanding functions on a sphere. Through this prior, the model can explicitly encode the geometric relationships between different scalp electrode configurations, enabling a single model to adapt to various electrode montages without requiring a separate input format for each device.
Legendre polynomials are a set of orthogonal polynomials defined on the interval [-1, 1]. When extended to spherical coordinates, they give rise to spherical harmonics, forming a complete orthogonal basis for any continuous function on a sphere. In EEG, the scalp can be approximated as a spherical surface, and the relative relationships between electrodes are fundamentally a matter of geometric distance and direction on that sphere. Traditional Cartesian coordinates or one-dimensional sequence indices cannot accurately describe this spherical topology, leading to severe distortion of spatial relationship information during cross-montage transfer. Using Legendre polynomials as a spatial encoding basis is equivalent to injecting a "spherically-aware positional bias" into the attention matrix, allowing the model to describe any electrode configuration (10-20 system, 64-channel, 256-channel, etc.) in a unified geometric language, without needing to independently learn spatial relationships for each layout.
Spatiotemporal Decomposed Attention and Spectral Regularization
To better align the architecture with the characteristics of EEG data, SPERA also incorporates two key components:
The first is decomposed temporal and spatial attention, periodically interleaved with full attention modules. EEG simultaneously has a temporal dimension (signal evolution over time) and a spatial dimension (multi-electrode spatial distribution). Processing them separately reduces computational complexity, while periodic full attention ensures sufficient cross-dimensional information exchange.
The second is a relational spectral regularizer. EEG analysis depends heavily on frequency-domain information (e.g., alpha, beta bands). This regularizer aligns the similarity structure in latent space with spectral views, ensuring the model retains sensitivity to frequency features during representation learning — which is the origin of the subtitle "geometry- and frequency-aware."
Joint-Embedding Predictive Architecture (JEPA) was systematically formalized by Yann LeCun's team, with representative implementations including I-JEPA and Video JEPA for vision. Unlike generative self-supervised methods (such as the MAE masked autoencoder), JEPA has a "context encoder" process the visible parts, and then a "predictor" predicts the target encoder's output for masked regions in latent space — rather than reconstructing at the pixel level. Since the target is a high-dimensional abstract representation rather than raw pixels, the model is forced to capture semantic-level structure instead of memorizing low-level textures or noise. For EEG, this means that while EMG, eye movements, and other non-neural artifacts occupy substantial energy in the raw signal, they struggle to form stable, predictable structures in latent space, and are thus naturally "faded out" of the learning objective.
Large-Scale Pretraining and Downstream Performance
The training scale of SPERA is substantial: approximately 80,000 hours of EEG data spanning 29,048 subjects across 106 datasets. Such a diverse data source is itself a rigorous test of the model's generalization ability, and gives credibility to its positioning as a general-purpose backbone network.
Evaluation results across nine downstream tasks show that SPERA achieves the highest average balanced accuracy. These nine tasks span three application domains — clinical, cognitive, and brain-computer interface — covering a broad range of scenarios, demonstrating that the model does not only excel in a single setting but delivers stable cross-domain performance.
The paper also highlights two practical advantages: first, parameter efficiency — under linear probing settings, SPERA achieves excellent performance by training only a small number of downstream parameters, implying low deployment cost; second, robustness — stable performance under different recording conditions, which is particularly important for the highly varied acquisition environments encountered in the real world.
Balanced accuracy is a corrected metric for classification evaluation that addresses class imbalance. It is calculated as the arithmetic mean of recall rates across all classes, rather than overall accuracy. EEG downstream tasks (such as epilepsy detection, sleep staging, and motor imagery recognition) commonly suffer from severe class imbalance — for example, epileptic seizure samples may account for less than 1% of total recording time. Using standard accuracy allows models to achieve inflated scores by simply favoring the majority class; balanced accuracy instead requires the model to demonstrate meaningful recognition ability across every class, making it a more convincing evaluation criterion in this field. SPERA's superiority in average balanced accuracy across nine tasks indicates that its performance gains do not stem from overfitting to the majority class, but reflect genuine discriminative capability.
Significance for the EEG Field
SPERA's value lies not only in pushing benchmark scores higher on a few leaderboards, but in demonstrating a technical path that diverges from the mainstream reconstruction paradigm. By combining JEPA's latent-space prediction framework, spherical geometric priors, and spectrally-aware regularization, it offers a new methodological reference for handling highly heterogeneous, artifact-rich physiological signals like EEG.
If its cross-device and cross-task generalization capabilities can be validated in broader independent evaluations, SPERA has the potential to become a universal pretrained backbone for EEG analysis — much like foundation models in vision and language — enabling researchers and clinicians to rapidly adapt to their specific tasks without training from scratch.
(This article is based on information from an arXiv preprint. The conclusions are pending peer review and further replication.)
Related articles

Free Unlimited Claude Code Solution: Agnes AI + CC Switch Setup Guide
No paid subscription needed — pair the free AI platform Agnes AI with the open-source tool CC Switch to provide a backend for Claude Code, enabling unlimited free calls to text, image, and video models. This guide covers the full setup, test results, and usage boundaries.

A Complete Zero-Cost Guide to Getting Started with Claude Code for Beginners in China
A beginner's guide to Claude Code for users in China: two installation methods (command line and IDE plugin), full configuration steps for replacing the official API with the free domestic LongCat model, and a hands-on demo of building a small tool with natural language, plus tips.

When the NSA Gets Involved: The AI Supply Chain Crisis Behind Open-Source CVEs and API Key Hijacking
Multiple open-source projects disclosed severe CVEs in one day, PHP flaws alarmed the FBI, and Railway and OpenCode were breached with API keys stolen. This article breaks down the vulnerability window, AI-accelerated exploitation, and the AI supply chain crisis behind the API key black market, with a developer defense checklist.