Sleep spindle and K-complex detection using tunable Q-factor wavelet transform and morphological component analysis

Tarek Lajnef, Sahbi Chaibi, Jean‐Baptiste Eichenlaub, Perrine Ruby, Pierre‐Emmanuel Aguera, Mounir Samet, Abdennaceur Kachouri, Karim JerbiFrontiers in Human Neuroscience 2015 · DOI

Abstract

A novel framework for joint detection of sleep spindles and K-complex events, two hallmarks of sleep stage S2, is proposed. Sleep electroencephalography (EEG) signals are split into oscillatory (spindles) and transient (K-complex) components. This decomposition is conveniently achieved by applying morphological component analysis (MCA) to a sparse representation of EEG segments obtained by the recently introduced discrete tunable Q-factor wavelet transform (TQWT). Tuning the Q-factor provides a convenient and elegant tool to naturally decompose the signal into an oscillatory and a transient component. The actual detection step relies on thresholding (i) the transient component to reveal K-complexes and (ii) the time-frequency representation of the oscillatory component to identify sleep spindles. Optimal thresholds are derived from ROC-like curves (sensitivity vs. FDR) on training sets and the performance of the method is assessed on test data sets. We assessed the performance of our method using full-night sleep EEG data we collected from 14 participants. In comparison to visual scoring (Expert 1), the proposed method detected spindles with a sensitivity of 83.18% and false discovery rate (FDR) of 39%, while K-complexes were detected with a sensitivity of 81.57% and an FDR of 29.54%. Similar performances were obtained when using a second expert as benchmark. In addition, when the TQWT and MCA steps were excluded from the pipeline the detection sensitivities dropped down to 70% for spindles and to 76.97% for K-complexes, while the FDR rose up to 43.62 and 49.09%, respectively. Finally, we also evaluated the performance of the proposed method on a set of publicly available sleep EEG recordings. Overall, the results we obtained suggest that the TQWT-MCA method may be a valuable alternative to existing spindle and K-complex detection methods. Paths for improvements and further validations with large-scale standard open-access benchmarking data sets are discussed.

Introduction

In sleep research, identifying specific "micro-events" in electroencephalography (EEG) is crucial for staging sleep and diagnosing disorders. Two hallmarks of Stage 2 (N2) sleep are sleep spindles (bursts of 11–16 Hz activity) and K-complexes (sharp, high-amplitude transient waves). Traditionally, these are identified through manual visual scoring by experts—a process that is notoriously tedious, subjective, and prone to low inter-rater agreement. While automatic detection exists, most tools treat these two events separately or rely on basic band-pass filtering. The challenge is that spindles and K-complexes often overlap in time and frequency, making it difficult for simple filters to isolate them without introducing noise or missing subtle events.

Methodology: Morphological Decomposition

The authors propose a "divide and conquer" strategy based on signal morphology rather than just frequency. The core of this approach is the Tunable Q-factor Wavelet Transform (TQWT) and Morphological Component Analysis (MCA).

Figure 2: Flowchart of the proposed joint detection framework for sleep spindles and K-complexes.

Unlike standard wavelets, TQWT allows researchers to tune the "Q-factor," which controls how much the wavelet "rings." A high Q-factor is ideal for oscillatory signals (spindles), while a low Q-factor matches transient, pulse-like signals (K-complexes). MCA then acts as the "source separation" engine, using the TQWT representations to decompose the raw EEG signal into two layers: an oscillatory component and a transient component.

Detection Pipeline

  • Spindles: The oscillatory component is analyzed using a Continuous Wavelet Transform (CWT) to create a time-frequency map. Local maxima are then thresholded to identify events.
  • K-complexes: The transient component is smoothed with a low-pass FIR filter (0.5–5 Hz), and local minima (the "sharp waves") are identified and thresholded.

Experimental Validation

The method was assessed using full-night EEG recordings from 14 healthy participants (average age 29.2), sampled at 1000 Hz and manually annotated by two independent experts. Additionally, the DREAMS database was used to validate generalizability on external data with different sampling rates.

Figure 5: A 30-second segment of raw sleep EEG data used as the input for the TQWT-MCA decomposition.

Key Results and Insights

The TQWT-MCA method showed high performance across the board:

  • Detection Accuracy: The system achieved 83.18% sensitivity for spindles and 81.57% sensitivity for K-complexes.
  • The Importance of Pre-processing: An ablation test showed that when the TQWT-MCA decomposition was skipped, spindle sensitivity dropped to 70%, and the FDR for K-complexes nearly doubled to 49.09%.
  • Data Efficiency: One of the most practical findings was that the algorithm reaches peak performance with very little expert-labeled data (fewer than 20 segments for spindles), making it highly viable for clinical settings.

Discussion and Conclusion

By prioritizing signal morphology over simple frequency bands, the TQWT-MCA framework offers a robust alternative to traditional detection methods. While the iterative nature of MCA is more computationally intensive than simple filtering, the gain in sensitivity and the reduction in false discoveries justify the cost. Future work may involve multi-electrode data to improve accuracy by analyzing the spatial distribution of these events, particularly to better distinguish K-complexes from similar transients like vertex waves.

Summary updated

Abstract

A novel framework for joint detection of sleep spindles and K-complex events, two hallmarks of sleep stage S2, is proposed. Sleep electroencephalography (EEG) signals are split into oscillatory (spindles) and transient (K-complex) components. This decomposition is conveniently achieved by applying morphological component analysis (MCA) to a sparse representation of EEG segments obtained by the recently introduced discrete tunable Q-factor wavelet transform (TQWT). Tuning the Q-factor provides a convenient and elegant tool to naturally decompose the signal into an oscillatory and a transient component. The actual detection step relies on thresholding (i) the transient component to reveal K-complexes and (ii) the time-frequency representation of the oscillatory component to identify sleep spindles. Optimal thresholds are derived from ROC-like curves (sensitivity vs. FDR) on training sets and the performance of the method is assessed on test data sets. We assessed the performance of our method using full-night sleep EEG data we collected from 14 participants. In comparison to visual scoring (Expert 1), the proposed method detected spindles with a sensitivity of 83.18% and false discovery rate (FDR) of 39%, while K-complexes were detected with a sensitivity of 81.57% and an FDR of 29.54%. Similar performances were obtained when using a second expert as benchmark. In addition, when the TQWT and MCA steps were excluded from the pipeline the detection sensitivities dropped down to 70% for spindles and to 76.97% for K-complexes, while the FDR rose up to 43.62 and 49.09%, respectively. Finally, we also evaluated the performance of the proposed method on a set of publicly available sleep EEG recordings. Overall, the results we obtained suggest that the TQWT-MCA method may be a valuable alternative to existing spindle and K-complex detection methods. Paths for improvements and further validations with large-scale standard open-access benchmarking data sets are discussed.
BibTeX
@inproceedings{lajnef2015sleep,
  author = {Tarek Lajnef and Sahbi Chaibi and Jean‐Baptiste Eichenlaub and Perrine Ruby and Pierre‐Emmanuel Aguera and Mounir Samet and Abdennaceur Kachouri and Karim Jerbi},
  title = {{Sleep spindle and K-complex detection using tunable Q-factor wavelet transform and morphological component analysis}},
  booktitle = {Frontiers in Human Neuroscience},
  year = {2015},
  doi = {10.3389/fnhum.2015.00414},
}
Figure