Jiayan Huo

and 4 more

Background: Sleep is crucial for overall health and well-being. Analyzing sleep stages and sleep fragmentation can enhance our understanding of sleep quality and help protect individuals’ sleep health. The objective of this study is to explore the development and application of a multitask deep learning model that can simultaneously detect sleep arousal and score sleep stages.Methods: We employed a task-incremental learning approach to develop the multi-task deep learning model. For development and testing, 1069 polysomnography records were incorporated. Additionally, the model’s fairness was assessed across various subgroups, including sex, age, and ethnicity. Beyond performance evaluation, we investigated the intermediate features extracted by the model from the raw ECG signal. Results: The multi-task deep learning model achieved a Cohen’s 𝜅 of 0.68 for sleep stage prediction and an area under the receiver operating characteristic (AUROC) of 0.94 for arousal detection. Additionally, the model showed consistent performance across different subgroups. The analysis of the interpretability of the intermediate features validated their applicability and adaptability to related tasks in sleep analysis. Conclusion: This study demonstrated the capacity of the multi-task deep learning model to score sleep stages and arousal simultaneously with substantial precision using a single-lead ECG. This research offers a promising avenue for advancing incremental learning and multitask deep learning models in sleep analysis.