AUTHOR=Zhang Di , Sun Jinbo , She Yichong , Cui Yapeng , Zeng Xiao , Lu Liming , Tang Chunzhi , Xu Nenggui , Chen Badong , Qin Wei TITLE=A two-branch trade-off neural network for balanced scoring sleep stages on multiple cohorts JOURNAL=Frontiers in Neuroscience VOLUME=Volume 17 - 2023 YEAR=2023 URL=https://www.frontiersin.org/journals/neuroscience/articles/10.3389/fnins.2023.1176551 DOI=10.3389/fnins.2023.1176551 ISSN=1662-453X ABSTRACT=Automatic sleep staging is a classification process with severe class imbalance and suffers from instability of scoring stage N1. A lower N1 accuracy significantly affects the diseased subjects' scoring. In this work, we aim to achieve automatic sleep staging with expert-level performance in both N1 stage and overall scoring. We develop a sleep stage prediction algorithm based on a two-branch neural network. The proposed model includes an attention-based convolutional neural network and a classifier with two branches. This model is trained by using the proposed transitive training strategy and facilitates the identification of difficult classes by balancing the universal feature training and contextual referencing. We perform parameter optimization and benchmark comparisons of the model using one large-scale dataset and then applied it to seven datasets in five cohorts. The proposed model achieve accuracy of 88.16%, Cohen’s kappa of 0.836, and MF1 score of 0.818 on SHHS1 test set. In addition, the accuracy of stage N1 is comparable to the human scorers. The introduction of multiple cohort data is conducive to the improvement in model’s performance. The proposed algorithm exhibits strong performance on previously unseen datasets, and its direct transferability is noteworthy for studies on automated sleep staging. The proposed method is publicly available, which is conducive to expanding access to sleep-related analysis, especially those associated with neurological or psychiatric disorders.