AI Model for Detecting Depression Based on Sleep Pattern Analysis Using Sequence Models - Ida Nurhaida; Gregorius Rizcy Orlando Pradana (APIC, 2026)
Depression is generally diagnosed through subjective clinical assessments, so objective biomarkers such as sleep patterns are needed. Unfortunately, conventional machine learning methods often ignore the temporal dynamics of sleep. This study aims to evaluate four Sequence Models architectures (LSTM, Bi-LSTM, GRU, Bi-GRU) to detect indications of depression from 7 days of sequential sleep data. The methodology processes data from 5,782 subjects using six physiological features (oxygen saturation, sleep efficiency, spindle microarchitecture) converted into a 3D matrix. Evaluation uses Precision, Recall, F1-Score, and ROC-AUC metrics to handle imbalanced data. The results prove that the Bidirectional model is more robust in capturing the temporal context holistically. Bi-GRU achieved the highest ROC-AUC score (0.9909), while Bi-LSTM produced the best F1-Score (0.85) and Recall (0.82). The standard GRU was validated as the most computationally efficient model (5 seconds/epoch). Explainable AI analysis confirmed that fast spindle percentage, REM duration, and spindle density are the strongest predictors of affective dysfunction. In conclusion, the Bidirectional architecture has proven reliable in identifying sleep anomalies, providing a solid foundation for real-time IoMT-based psychiatric screening systems.