DOSED: a deep learning approach to detect multiple sleep micro-events in EEG signal.

Stanislas Chambon, Valentin Thorey, Pierrick J. Arnal, Emmanuel Mignot, Alexandre GramfortarXiv 2018

TL;DR

DOSED (Dreem One Shot Event Detector) is a novel deep learning framework that automatically detects sleep micro-events—such as spindles and arousals—directly from raw EEG signals. By adapting "one-shot" object detection techniques from computer vision, it jointly predicts event timing, duration, and type, significantly outperforming traditional hand-crafted methods across multiple clinical datasets.

What Problem Does This Paper Address?

In sleep medicine, clinicians don't just look at 30-second "sleep stages"; they also look for micro-architectural events like sleep spindles (short bursts of brain activity), K-complexes, and arousals. These events are vital for diagnosing sleep disorders and understanding brain physiology.

However, identifying these events is a major bottleneck. It is traditionally done manually by experts, a process that is notoriously slow, expensive, and prone to "inter-scorer variability" (different experts often disagree on the same signal). While automated tools exist, they are usually "brittle": they require manual feature engineering, are often specific to only one type of event, and struggle with the variable durations and shapes of real-world EEG signals.

Methods

The authors introduce DOSED, a neural network architecture inspired by popular computer vision object detectors like YOLO and SSD. The core idea is to treat an EEG signal not just as a sequence, but as a space where "objects" (events) live.

The architecture consists of three main parts:

  1. Spatial Filtering: A module that performs linear combinations of EEG channels to increase the signal-to-noise ratio.
  2. Temporal Feature Extraction: A series of convolutional blocks that build a high-level representation of the raw signal.
  3. Localization and Classification: Instead of scanning the signal window-by-window, DOSED uses a grid of "default events" (similar to anchor boxes in vision). For every default event, the model predicts:
  4. An adjusted center and duration (localization).
  5. The probability of it being a specific type of event or just background noise (classification).
Figure 1: Prediction procedure for DOSED. A: Nd default events, di, i ∈JNdK, are generated over the EEG sample. B: the network

The model is trained end-to-end using a multi-task loss function that combines a classification loss (cross-entropy) and a localization loss (Huber loss). To handle the fact that most sleep signal contains no events, the authors implemented a "negative mining" strategy to balance the training batches.

Architecture summary

Datasets

The researchers validated DOSED across four diverse datasets to ensure robustness:

  • MASS SS2: A public dataset of 19 recordings, used for spindles and K-complexes.
  • Stanford Sleep Cohort (SSC): 26 recordings with consensus scoring from multiple experts.
  • Wisconsin Sleep Cohort (WSC): 30 recordings, also using consensus scoring.
  • MESA: A massive public dataset (1000 recordings) used specifically to test arousal detection.
Dataset properties and training parameters

Key Insights and Ideas

  • EEG as 1D Vision: The most powerful insight is that EEG event detection is structurally identical to object detection in images. By treating time as the spatial dimension, the authors could leverage highly optimized architectures from the vision community.
  • End-to-End Learning: Unlike previous methods that required band-pass filtering (e.g., 11–16 Hz for spindles), DOSED learns the relevant frequency features directly from raw data.
  • Joint Detection: The model can be trained to detect multiple types of events simultaneously (e.g., spindles and K-complexes) without a drop in performance, proving that the shared feature representation is highly efficient.
  • Precision in Timing: While many baseline methods only identify the "peak" of an event, DOSED accurately predicts the start and end times, which is crucial for calculating event duration.

Key Results

DOSED consistently outperformed state-of-the-art (SOTA) methods across all metrics (Precision, Recall, and F1-score):

  • Spindle Detection: On the MASS SS2 dataset, DOSED achieved significantly higher F1-scores across all overlap thresholds (IoU) compared to traditional algorithms like Spinky or Parekh et al.
  • K-Complexes: The model showed a major advantage in predicting durations. Baseline methods often assume a fixed duration (e.g., 1.4s), whereas DOSED adapted to the actual signal, leading to much more stable performance as the overlap criteria became stricter.
  • Arousal Detection: On the large MESA dataset, DOSED demonstrated it could scale to much longer events (~10s) and benefit significantly from including multiple EEG and EOG channels.

Limitations and Future Work

The authors note that the choice of default event duration is a critical hyperparameter; if the anchors are too different from the true events, the model struggles to "match" them during training.

Future directions include:

  • Multi-scale detection: Using multiple levels of feature maps (like Feature Pyramid Networks) to better detect events of vastly different scales (e.g., 0.5s spindles vs. 1-minute apnea events) simultaneously.
  • Temporal Context: Integrating Recurrent Neural Networks (RNNs) to help the model understand the likelihood of an event based on what happened seconds or minutes prior.
  • New Modalities: Extending the approach to detect respiratory events or leg movements using breathing and EMG channels.

Summary updated

BibTeX
@misc{chambon2018dosed,
  author = {Stanislas Chambon and Valentin Thorey and Pierrick J. Arnal and Emmanuel Mignot and Alexandre Gramfort},
  title = {{DOSED: a deep learning approach to detect multiple sleep micro-events in EEG signal.}},
  year = {2018},
  eprint = {1812.04079},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.04079},
}
Figure