ATTA: Adaptive Test-Time Adaptation for Multi-Modal Sleep Stage Classification

Ziyu Jia, Xihao Yang, Chenyang Zhou, Haoyang Deng, Tianzi Jiang

Abstract

Automated sleep stage classification is essential for large-scale sleep disorder diagnosis but is often hampered by significant inter-subject variability. Traditional models trained on source populations frequently fail when deployed on new individuals due to differences in physiological signals. We propose ATTA (Adaptive Test-Time Adaptation), a framework designed to enhance model robustness during inference. ATTA utilizes a dual-model "retained-adaptive" architecture to prevent catastrophic forgetting, an inter-modal contribution assessment module to balance sensor reliability, and an adaptive learning rate strategy to handle varying distribution shifts. Experimental results on the SleepEDF and SHHS datasets demonstrate that ATTA significantly outperforms existing test-time adaptation methods, achieving up to 78.04% accuracy in cross-dataset scenarios.

Introduction

Sleep staging—the categorization of sleep into Wake, REM, and N1-N3 stages—is a cornerstone of sleep medicine. While deep learning has improved automated staging, the "domain shift" between training data and real-world patients remains a major hurdle. Factors like age, health status, and recording hardware cause EEG and EOG signals to vary wildly between subjects.

Test-Time Adaptation (TTA) offers a potential solution by updating models during deployment. However, standard TTA approaches struggle with three core issues: catastrophic forgetting (losing general knowledge while over-specializing), modality imbalance (failing to weigh sensors like EEG and EOG appropriately for different sleep stages), and static adaptation (using fixed learning rates regardless of the severity of the distribution shift).

Methodology: The ATTA Framework

The ATTA framework addresses these challenges through three integrated components designed for robust, real-time inference.

Overview of the ATTA framework architecture, highlighting the dual-model structure and contribution assessment module.

1. Intra-Modal Retained-Adaptive Module

To combat catastrophic forgetting, ATTA employs two parallel branches for each modality (EEG and EOG). The Adaptive model is updated rapidly to capture subject-specific nuances. Simultaneously, a Retained model acts as a stable "anchor," updated via a momentum-based approach to preserve the general features learned during initial training. By fusing the outputs of these two branches, the system maintains high performance without drifting into instability.

2. Inter-Modal Contribution Assessment Module

Different sleep stages are best identified by different sensors; for instance, EOG is highly informative for REM sleep, while EEG is critical for N3. ATTA dynamically assesses the reliability of each modality for every incoming sample. It calculates the similarity (KL divergence) between the adaptive and retained branches. A high discrepancy suggests the modality may be unreliable for that specific sample, leading the system to down-weight its contribution to the final classification.

3. Adaptive Learning Rate Strategy

Not all distribution shifts are equal. ATTA utilizes a memory bank of feature vectors to measure how "novel" a new patient's data is compared to previously seen patterns. If a significant shift is detected, the framework automatically increases the learning rate to accelerate adaptation. Conversely, for familiar data, the learning rate is reduced to maintain the model's current state.

Experimental Results

The researchers evaluated ATTA using two benchmark datasets: SleepEDF (153 recordings) and SHHS (329 recordings). The experiments focused on "mutual migration"—training on one dataset and testing on the other—to simulate real-world deployment across different clinical environments.

Performance comparison of ATTA against state-of-the-art test-time adaptation methods across two major sleep datasets.

As shown in the results table, ATTA consistently achieves superior performance. In the SleepEDF → SHHS task, ATTA reached 78.04% accuracy, a significant improvement over the "No Adapt" baseline (64.09%) and the previous state-of-the-art TTA method, SAR (72.75%). The F1-scores follow a similar trend, indicating that the model performs well across all sleep stages, including minority classes.

Discussion and Key Insights

Ablation studies confirmed the importance of the "Retained" model; removing it led to a sharp drop in accuracy, proving that adaptation without a stable anchor leads to overfitting on test-time noise. Furthermore, the framework demonstrated remarkable stability regarding the order of patient arrival, a common pain point for online adaptation methods. This robustness suggests that ATTA is well-suited for long-term clinical use where patient data arrives sequentially.

Conclusion

ATTA represents a significant step forward in making automated sleep staging clinically viable. By intelligently balancing adaptation with retention and dynamically weighting multi-modal inputs, it overcomes the primary weaknesses of standard test-time adaptation. Future work will focus on reducing the computational overhead of the dual-model architecture to enable deployment on resource-constrained wearable devices and exploring the integration of additional modalities like EMG.

Summary updated

BibTeX
@inproceedings{jia2024atta,
  author = {Ziyu Jia and Xihao Yang and Chenyang Zhou and Haoyang Deng and Tianzi Jiang},
  title = {{ATTA: Adaptive Test-Time Adaptation for Multi-Modal Sleep Stage Classification}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
}
Figure