eess.SPNov 4, 2026

Adapting Sleep Foundation Models for Dense Sleep Spindle Localization

Authors: Alexis Bollengier, Abel Díaz Berenguer, Olivier Pallanca, André Anjos, Hichem Sahli

Organizations: Department of Electronics and Informatics (ETRO), Vrije Universiteit Brussel (VUB), Brussels, Belgium · Idiap Research Institute, Martigny, Switzerland · Interuniversity Microelectronics Centre (IMEC), Heverlee, Belgium

Abstract

Adapting sleep foundation models to dense electroencephalography (EEG) event localization is challenging because multi-second representations may not preserve sufficient temporal detail for precise boundary recovery. We address sleep spindle localization by adapting a frozen SleepFM encoder with a local time-frequency pathway that preserves spindle-relevant spectral content and intra-token position. The local representation drives localization, while residual cross-attention incorporates SleepFM temporal context. Dense predictions are obtained through localized token-to-sample reconstruction and temporal refinement. Tested on the Massive Online Data Annotation (MODA), the proposed model achieves an event-level F1F_1 of 0.8080±0.00400.8080 \pm 0.0040 at IoU 0.2 across six folds. Ablations show that localization primarily depends on local spectral and sub-token temporal information, while the pretrained representation provides complementary context. These results indicate that dense adaptation benefits from preserving information below the pretrained token scale. Code will be released upon acceptance.

Figures & tables

Explore similar work

Aug 7, 2026

ZIPBrain: Can EEG Foundation Models Be Faster, Locally Deployable, but Accurate?

This work investigates whether Electroencephalograph (EEG) foundation models (EFMs) can be made faster and locally deployable without sacrificing accuracy. EEG foundation models are a major trend, offering strong general-purpose representations. However, their computational burden grows quadratically with input length, hindering deployment on resource-constrained scenario, particularly for real-time clinical monitoring. EEG's low SNR further suggests many of these tokens are redundant and compressible with little accuracy cost. We propose ZIPBrain, a novel redundancy-aware EEG token pooling module that leverages this low-SNR characteristic to reduce token count. Given a token sequence, ZIPBrain partitions tokens into redundant and unique groups, then merges each redundant token with its most similar counterpart in the unique group. Furthermore, ZIPBrain serves as a training-free, plug-and-play module that seamlessly integrates into standard Transformer encoders with negligible computational overhead. Extensive experiments across multiple EEG foundation models show ZIPBrain's strong versatility, achieving 1.3%-10.5% average improvement over baselines, while reducing wall-clock inference time by 32.7% (up to 41.8% with CUDA Graph) compared to the original EEG foundation models.
Aug 14, 2026

Comparative Analysis of State-of-the-Art Foundation Models for Sleep Analysis Under Channel Reduction

Automatic sleep staging from polysomnography (PSG) is a well-studied task, but PSG itself is expensive, clinic-based, and burdensome to manually score, which limits its use for long-term or at-home monitoring. Most existing sleep-staging foundation models are evaluated using the full PSG montage. We instead ask how much of that montage is actually necessary. We evaluate six sleep staging models on the Multi-Ethnic Study of Atherosclerosis (MESA) PSG dataset across three signal conditions: electroencephalography (EEG), electrocardiography (ECG), and their combination (EEG+ECG). This is motivated by edge-cloud deployment, where EEG requires a clinic-grade scalp electrode, whereas ECG is already captured by consumer wearables. We test state-of-the-art foundation models such as SleepFM with an encoder trained from scratch on MESA, alongside BIOT, MOMENT, LaBraM, a base-scale Vision Transformer (ViT-B) reimplementation of SensorLM trained from scratch, and YASA, spanning EEG-pretrained, general-time-series, from-scratch, and classical non-learned approaches. No model architecture is modified from its original form; SensorLM's encoder is reimplemented only in PyTorch. For EEG-only staging, BIOT achieves the best result with a macroF1 of 0.7237, followed by LaBraM (0.6835) and SleepFM from scratch (0.6582). Across the five models capable of ECG-only staging, switching from EEG to ECG costs between 0.2798 (MOMENT) and 0.4151 (BIOT) macroF1, averaging 0.3531, while cutting the raw channel data rate to a third. Adding ECG to EEG provides no gain for most models. These results show that EEG carries most of the sleep-staging signal, quantify the consistent accuracy cost of the wearable-compatible alternative, and demonstrate that sleep-relevant pretraining transfers well to MESA.
Oct 21, 2026

BrainCodes: A Lightweight EEG Foundation Model over Discrete Neural Codes

Recent electroencephalography (EEG) foundation models increasingly emphasize model scale, potentially limiting their deployment on resource-constrained devices and in everyday environments. We argue that transferable EEG features can instead be learned with a compact architecture and introduce BrainCodes, a lightweight foundation model pretrained through self-supervised learning on more than 800 hours of recordings from over 1,000 participants. Our architecture combines a quantization-based neural tokenizer with a spatiotemporal encoder that supports arbitrary electrode configurations. The pretraining objective explicitly encourages representations that capture spatial connectivity through channel positional encoding, and sensitivity to narrowband neural oscillations through an auxiliary training objective. Our model matches or surpasses the state of the art across diverse neurophysiological monitoring tasks, including sleep staging, attention assessment, and cognitive load estimation. BrainCodes transfers effectively to low-resource wearable devices while using up to 97% fewer trainable parameters than comparable architectures. Beyond predictive accuracy, our evaluation framework characterizes the geometry and invariances of learned EEG representations across measurable spatial, temporal, and spectral signal properties.