LLM-Assisted Label Noise Correction for EEG-Based Sleep Stage Classification
Organizations: School of Computing, Wichita State University, Wichita, Kansas, USA
Abstract
Automatic sleep stage classification from electroencephalography (EEG) signals is a critical task in clinical sleep medicine. While deep learning models have shown promising results in this domain, their performance is fundamentally constrained by the quality of training labels, which human experts manually annotate and that are subject to inter-rater disagreement and systematic labeling errors. In this paper, we propose a novel LLM-assisted label-noise filtering pipeline that operates exclusively during training to identify and remove unreliable sleep-stage annotations before retraining the classifier. Specifically, TinySleepNet is first trained on the original dataset to extract per-epoch SoftMax confidence scores, then low-confidence epochs are submitted to LLaMA 3.1 along with their EEG spectral features and surrounding sequence context. The LLM evaluates each epoch against AASM sleep-scoring guidelines and assigns a verdict of RELIABLE or SUSPICIOUS. Suspicious epochs are removed from the training set, and TinySleepNet is retrained on the cleaned data. Evaluated on the Sleep-EDF Expanded dataset using 20-fold cross-validation, our method improves overall accuracy from 81.8% to 84.6% and Macro F1-score from 75.6% to 77.4%, with particularly notable gains in REM detection. Crucially, because the LLM operates only during training, the lightweight TinySleepNet architecture (1.3M parameters) is preserved at inference, making the proposed pipeline suitable for real-time, wearable sleep monitoring applications.
Figures & tables
| Data Split | Mean | Min | Max |
|---|---|---|---|
| Training | 38,070 | 37,025 | 39,306 |
| Validation | 3,938 | 3,827 | 5,227 |
| Test | 2,211 | 1,028 | 3,368 |
| Total Unique Epochs: 195,479 | |||
| Method | Candidates | Removed | Acc (%) | MF1 (%) |
|---|---|---|---|---|
| Baseline | - | - | 81.8 | 75.6 |
| = 0.5 | 22,689 | 10,478 | 84.6 | 77.4 |
| = 0.7 | 118,816 | 43,942 | 80.5 | 74.8 |
Sleep Stage Classification
Sleep stage classification assigns sleep epochs to physiological stages from signals such as EEG, helping quantify sleep architecture and support clinical monitoring.
See all 42 papers