Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Medical Informatics

Date Submitted: Dec 31, 2024
Date Accepted: Sep 30, 2025

The final, peer-reviewed published version of this preprint can be found here:

Analyzing Sleep Behavior Using BERT-BiLSTM and Fine-Tuned GPT-2 Sentiment Classification: Comparison Study

Deng Y, van der Meer J, Tzovara A, Schmidt M, LA Bassetti C, Denecke K

Analyzing Sleep Behavior Using BERT-BiLSTM and Fine-Tuned GPT-2 Sentiment Classification: Comparison Study

JMIR Med Inform 2025;13:e70753

DOI: 10.2196/70753

PMID: 41213114

PMCID: 12599995

How well did patients sleep? Analyzing sleep behavior using BERT-BiLSTM and finetuned GPT-2 Sentiment classification: a comparison study

  • Yihan Deng; 
  • Julia van der Meer; 
  • Athina Tzovara; 
  • Markus Schmidt; 
  • Claudio LA Bassetti; 
  • Kerstin Denecke

ABSTRACT

Background:

The diagnosis of sleep disorders presents a challenging landscape, characterized by the complex nature of their assessment and the often divergent views between objective clinical assessment and subjective patient experience. This study explores the interplay between these perspectives, focusing on the variability of individual perceptions of sleep quality and latency.

Objective:

Our primary goal is to investigate the alignment, or lack thereof, between subjective experiences and objective measures in the assessment of sleep disorders.

Methods:

To study this, we developed an aspect-based sentiment analysis method: Using large language models (Falcon 40b and Mixtral 8X7B), we are identifying entity groups of three aspects related to sleep behavior (day sleepiness, sleep quality, fatigue). From phrases referring to these aspects, we are assigning sentiment values between 0 and 1 using a BERT-BiLSTM-based approach (accuracy 78%) and a fine-tuned GPT-2 sentiment classifier (accuracy 87%).

Results:

The results show that our approach is able to handle the specialized language occurring in the sleep disorder domain and identify the sentiment and opinion in clinical records.

Conclusions:

Our method has potential in uncovering critical insights into patient self-perception versus clinical evaluations. Clinical Trial: The secondary usage of Berner Sleep Data Base (BSDB) from Inselspital, University Hospital Bern, was approved by the local ethics committee (KEK-Nr. 2022-00415)


 Citation

Please cite as:

Deng Y, van der Meer J, Tzovara A, Schmidt M, LA Bassetti C, Denecke K

Analyzing Sleep Behavior Using BERT-BiLSTM and Fine-Tuned GPT-2 Sentiment Classification: Comparison Study

JMIR Med Inform 2025;13:e70753

DOI: 10.2196/70753

PMID: 41213114

PMCID: 12599995

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.