Manuscript Offprint

arXiv:2611.06546

Adapting Sleep Foundation Models for Dense Sleep Spindle Localization

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

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 F1 of 0.8080±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.

Index Terms— sleep spindle detection, EEG, sleep foundation models, time-frequency representation, dense temporal localization

1. INTRODUCTION

Sleep spindles are transient EEG events in non-rapid eye movement sleep, typically lasting 0.5–3 s with sigma-band activity around 11–16 Hz [1]. Their characteristics are linked to memory consolidation and investigated as biomarkers for neuropsychiatric disorders [2], motivating accurate detection and boundary delineation.

Dense detectors such as SUMO [3] and BLAST [4] learn task-specific spindle representations, whereas sleep foundation models learn reusable representations from large polysomnography datasets. SleepFM [5] supports multiple downstream tasks but compresses multi-second EEG windows into compact tokens, creating a resolution mismatch for dense localization. SleepGPT [6] supports spindle detection by jointly learning temporal and frequency-domain representations during pretraining. Here, rather than pretraining a new time-frequency backbone, we adapt a frozen representation

with task-specific local information to recover boundaries below the pretrained token scale.

The proposed architecture keeps a pretrained SleepFM encoder frozen and adds a local time-frequency branch that preserves spindle-related spectral information and intra-token position. Residual cross-attention incorporates the pretrained SleepFM representation as complementary context, followed by sample-level reconstruction of sub-token temporal structure.

The main contributions are: (1) dense sample-level adaptation of a frozen SleepFM encoder; (2) a physiologically structured time-frequency representation preserving local spectral content and intra-token position, with asymmetric cross-attention to the pretrained SleepFM representation; and (3) localized token-to-sample reconstruction with reinjection of retained intra-token features. The approach is evaluated on the MODA benchmark using MASS EEG segments and expert-consensus spindle annotations across six published folds, with controlled architectural ablations.

References (17)

  • Sleep spindles: Mechanisms and functions
  • Abnormal sleep spindles, memory consolidation, and schizophrenia
  • Advanced sleep spindle identification with neural networks
  • BLAST: Towards robust detection of sleep spindles across clinical settings
  • A multimodal sleep foundation model for disease prediction
  • A unified time-frequency foundation model for sleep decoding
  • A better way to define and describe Morlet wavelets for time-frequency analysis
  • Squeeze-and-excitation networks
  • Attention is all you need
  • An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling
  • Focal loss for dense object detection
  • V-Net: Fully convolutional neural networks for volumetric medical image segmentation
  • Fast R-CNN
  • Auto-encoding variational Bayes
  • Montreal Archive of Sleep Studies: An open-access resource for instrument benchmarking and exploratory research
  • Massive online data annotation, crowdsourcing to generate high quality sleep spindle annotations from EEG data
  • Optuna: A next-generation hyperparameter optimization framework