# Hybrid Deep Learning Approach for Automated Sleep Cycle Analysis
## 5 Conclusions  
The proposed hybrid architecture, which combines CNNs, BiLSTM layers, and attention mechanisms, demonstrated solid performance by extracting meaningful features from raw EEG data. It achieved overall accuracy of 78.67% and an F1-score of 72.10%, reflecting balanced performance across sleep stages. To improve its generalization and reduce bias, the model incorporates the E-LRUS procedure, which subsamples entire 30 s segments to preserve temporal coherence. This strategy contributed to strong performance in N3, the second most underrepresented stage, with an F1-score of 87.93%, outperforming more frequent stages such as N2 and W. By balancing the training data without altering its natural structure, the model mitigated overfitting and enabled robust detection between stages. This synergy between the architecture and data handling supports a reproducible end-to-end solution for biomedical signal classification.  
Future work should address class imbalance through targeted data augmentation and class-aware training, while also integrating time- and frequency-domain processing within deeper or residual network architectures to capture more intricate patterns with fewer parameters. Additional improvements may include refined architectures, multiscale temporal features, temporal context enhancement, and specialized loss functions designed to better detect the underrepresented stage N1. Since model performance depends on factors such as the dataset size, diversity, class imbalance, and design choices, continued efforts could focus on hybrid architectures, advanced data enhancement, and balanced training strategies to improve the reliability, generalizability, and clinical applicability. Incorporating complementary modalities such as EMG or EOG, developing interpretability tools for clinicians, and exploring lightweight model variants suitable for portable devices will further support real-world clinical adoption. Extending this framework to other EEG-based diagnostic tasks could broaden its impact in sleep medicine.  
Conceptualization, S.U.F., A.D.F. and P.A.; methodology, S.U.F. and A.D.F.; software, S.U.F., A.D.F. and P.A.; validation, S.U.F., A.D.F. and P.A.; formal analysis, S.U.F., A.D.F., D.Z.-B., P.P.J. and C.A.A.-M.; investigation, S.U.F., A.D.F. and P.A.; resources, S.U.F. and A.D.F.; data curation, S.U.F. and A.D.F.; writing--original draft preparation, S.U.F., A.D.F. and P.A.; writing--review and editing, S.U.F., A.D.F. and P.A.; visualization, S.U.F., A.D.F., P.A., D.Z.-B., P.P.J. and C.A.A.-M.; supervision, A.D.F.; project administration, A.D.F.; funding acquisition, A.D.F. All authors have read and agreed to the published version of the manuscript.  
The authors acknowledge the following financial support: ANID/FONDECYT Iniciacion No. 11230129 and DICYT Regular No. 062313 AS.  
Not applicable.  
Dataset available on request from the authors. Upon request, the authors will provide access to the data supporting the results presented in this article.  
The authors acknowledge the following support: ANID/FONDECYT Iniciacion No. 11230129, DICYT Regular No. 062313 AS, ANID/FONDECYT Iniciacion No. 11240799, Cost Center No: 02030402-999, Department of Electricity, ANID Vinculacion Internacional FOVI240009, Universidad de Las Americas under Project 563.B.XVI.25, SENESCYT \"Convocatoria abierta 2014-primera fase, Acta CIBAE-023-2014\", Pontificia Universidad Catolica del Ecuador under Project PEP QINV0485-IINV528020300, and Project ANID Vinculacion Internacional FOVI 240009. This thesis was developed using LEITAT Chile's computational resources, which are gratefully acknowledged.  
The authors declare no conflicts of interest.