BiT-MamSleep: Bidirectional Temporal Mamba for EEG Sleep Staging

Xinliang Zhou,Yuzhe Han,Chenyu Liu,Yi Ding,Ziyu Jia,Yang Liu
2024-11-03
Abstract:In this paper, we address the challenges in automatic sleep stage classification, particularly the high computational cost, inadequate modeling of bidirectional temporal dependencies, and class imbalance issues faced by Transformer-based models. To address these limitations, we propose BiT-MamSleep, a novel architecture that integrates the Triple-Resolution CNN (TRCNN) for efficient multi-scale feature extraction with the Bidirectional Mamba (BiMamba) mechanism, which models both short- and long-term temporal dependencies through bidirectional processing of EEG data. Additionally, BiT-MamSleep incorporates an Adaptive Feature Recalibration (AFR) module and a temporal enhancement block to dynamically refine feature importance, optimizing classification accuracy without increasing computational complexity. To further improve robustness, we apply optimization techniques such as Focal Loss and SMOTE to mitigate class imbalance. Extensive experiments on four public datasets demonstrate that BiT-MamSleep significantly outperforms state-of-the-art methods, particularly in handling long EEG sequences and addressing class imbalance, leading to more accurate and scalable sleep stage classification.
Signal Processing,Machine Learning
What problem does this paper attempt to address?
This paper attempts to solve several key problems in automatic sleep - stage classification: 1. **High computational cost**: When dealing with long - time high - resolution EEG sequences, the Transformer model has a quadratic increase in computational complexity with the sequence length, resulting in excessive computational cost and difficulty in efficiently processing complex datasets. 2. **Insufficient bidirectional time - dependence modeling**: Existing Transformer models mainly perform one - way processing within a fixed time window and cannot fully capture the bidirectional (past and future) time - dependence required in the sleep - stage transition process. This is especially important for processing long - time EEG sequences because these sequences contain subtle and gradual changes. 3. **Class imbalance problem**: The occurrence frequency of sleep stages such as REM is much lower than that of other stages (such as NREM), which leads to class imbalance in the data. This imbalance makes the model tend to predict the majority class, thus affecting the overall classification accuracy, especially performing poorly in detecting minority - class sleep stages. To solve these problems, the authors propose the BiT - MamSleep architecture. Specific improvements include: - **Triple - Resolution CNN (TRCNN)**: It is used to efficiently extract multi - scale features to capture the characteristics of EEG signals in different frequency bands. - **Bidirectional Mamba (BiMamba) mechanism**: By bidirectionally processing EEG data, it simultaneously captures short - term and long - term time - dependence, thus representing sleep - stage transitions more accurately. - **Adaptive Feature Recalibration (AFR) module**: Dynamically adjusts the importance of features to optimize classification accuracy without increasing computational complexity. - **Optimization techniques**: Such as Focal Loss and SMOTE, are used to alleviate the class imbalance problem, increase the model's attention to difficult - to - classify samples, and generate synthetic minority - class data. Through these improvements, BiT - MamSleep significantly improves its performance in processing long EEG sequences and dealing with class imbalance. Experimental results on multiple public datasets show that it outperforms existing advanced methods.