Abstract
This paper introduces STAMP (Spatial-Temporal Adapter with Multi-Head Pooling), a lightweight adapter designed to bridge the gap between general-purpose Time Series Foundation Models (TSFMs) and specialized Electroencephalography (EEG) tasks. By leveraging frozen TSFMs and adding only ~750k trainable parameters, STAMP efficiently captures the complex spatial and temporal dynamics of brain activity. Our evaluation across eight benchmark datasets demonstrates that STAMP achieves state-of-the-art performance in clinical EEG classification while being significantly more parameter-efficient than specialized EEG foundation models.
Introduction
Electroencephalography (EEG) data presents a unique challenge for machine learning due to its multi-channel, spatial-temporal nature. While general TSFMs have shown promise in learning universal patterns across diverse domains (e.g., finance, weather), they often struggle with the high-dimensional, multi-channel structure of EEG. Conversely, specialized EEG Foundation Models (EEGFMs) require extensive domain-specific pre-training and millions of parameters. STAMP addresses this by asking: Can we take a "jack-of-all-trades" time series model and efficiently adapt it for the highly specialized world of EEG?
Methods
The STAMP architecture is designed to sit on top of a frozen TSFM (such as MOMENT), acting as a specialized "translator" for brain signals. The process follows four distinct stages:
- Embedding Generation: EEG data is sliced into 1-second tokens and fed into a frozen TSFM to generate high-dimensional embeddings.
- Positional Encoding (PE): Since the TSFM is frozen and univariate, STAMP adds learnable encodings to represent the specific token, its spatial location (electrode position), and its temporal position.
- Criss-Cross Gated MLP (CC-GMLP): This module interactively processes spatial and temporal relationships separately but interactively, capturing how brain activity spreads across the scalp more efficiently than standard transformers.
- Multi-Head Attention Pooling (MHAP): An attention mechanism determines which tokens are most relevant for final classification tasks, such as seizure detection or motor imagery.
Results and Discussion
STAMP was evaluated across 8 benchmark datasets covering clinical events (TUEV), motor imagery (SHU-MI, PhysioNet-MI), and cognitive tasks.
Key Performance Insights
- Efficiency and Scalability: STAMP uses roughly 0.74M trainable parameters, compared to 29M for specialized models like CBraMod. This represents a ~97% reduction in trainable parameters while maintaining or exceeding state-of-the-art accuracy.
- Spatial Awareness: Ablation studies revealed that spatial-temporal positional encodings are mandatory; without them, performance drops to near-random levels.
- Architectural Superiority: The CC-GMLP mixing stage consistently outperformed standard Transformer architectures across multiple datasets, providing a more efficient way to model the "brain grid."
Limitations
While STAMP excelled at clinical tasks, it struggled with emotion recognition (SEED-V/FACED). This suggests that general TSFMs may not yet capture the subtle, high-frequency nuances required for affective computing. Additionally, while the adapter is lightweight, the initial embedding generation from a large frozen model still requires significant pre-computation.
Conclusion
STAMP proves that the features learned by general TSFMs are rich enough for specialized EEG applications when paired with an efficient spatial-temporal adapter. Future work will focus on incorporating the 3D spherical geometry of the human head and improving model interpretability for clinical trust.
Summary updated