Analyzing Sleep Behavior Using BERT-BiLSTM and Fine-Tuned GPT-2 Sentiment Classification: Comparison Study
Yihan Deng1,2, Julia van der Meer3, Athina Tzovara1,4
1Institute of Computer Science, University of Bern, Neubrückstrasse 10, Bern, Switzerland, +41 316848426.
JMIR Medical Informatics
|November 10, 2025
Summary
Discrepancies exist between patient-reported sleepiness and objective measures. Clinical narratives, analyzed using sentiment analysis, better capture these differences than standardized tests, aiding diagnosis.
Area of Science:
- Computational linguistics
- Clinical informatics
- Sleep medicine
Background:
- Sleep disorder diagnosis is complex, often showing a gap between objective clinical data and subjective patient experiences.
- Individual perception of sleep quality and latency can vary significantly.
Purpose of the Study:
- To investigate the alignment between subjective patient experiences and objective measurements in sleep disorder assessment.
- To explore how clinical narratives can provide insights into sleepiness perception.
Main Methods:
- Developed an aspect-based sentiment analysis method using large language models (Falcon 40B, Mixtral 8X7B) to analyze clinical narratives.
- Identified sleep behavior aspects (day sleepiness, sleep quality, fatigue) and assigned sentiment scores (0-1) using BERT-BiLSTM (78% accuracy) and GPT-2 (87% accuracy).
Main Results:
- Approximately 15% of 100 patients showed discrepancies between subjective (Karolinska Sleepiness Scale) and objective (Multiple Sleep Latency Test) daytime sleepiness assessments.
- Sentiment analysis of clinical narratives revealed statistically significant divergence in sleepiness perception (P=.047), outperforming standardized measures.
- Narrative free text analysis highlighted the importance of subjective sources in assessing fatigue and sleepiness.
Conclusions:
- The developed sentiment analysis method can reveal critical insights into patient self-perception versus clinical evaluations.
- This approach aids clinicians in identifying patients who may require objective verification of self-reported sleep symptoms.
- Integrating narrative free text analysis enhances the comprehensive assessment of sleep disorders.


