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: Journal of Medical Internet Research

Date Submitted: Nov 16, 2023
Date Accepted: Aug 11, 2024

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

Using Large Language Models to Detect Depression From User-Generated Diary Text Data as a Novel Approach in Digital Mental Health Screening: Instrument Validation Study

Shin D, Kim H, Lee S, Cho Y, Jung W

Using Large Language Models to Detect Depression From User-Generated Diary Text Data as a Novel Approach in Digital Mental Health Screening: Instrument Validation Study

J Med Internet Res 2024;26:e54617

DOI: 10.2196/54617

PMID: 39292502

PMCID: 11447422

Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.

Text data as a marker for screening depression: Applying a large language model

  • Daun Shin; 
  • Hyoseung Kim; 
  • Seunghwan Lee; 
  • Younhee Cho; 
  • Whanbo Jung

ABSTRACT

Background:

Depressive disorders have substantial global implications, leading to various social consequences, including decreased occupational productivity and a high disability burden. Early detection and intervention for clinically significant depression have gained attention; however, the existing depression screening tools, such as the Center for Epidemiologic Studies Depression Scale, have limitations in objectivity and accuracy. Therefore, researchers are identifying objective indicators of depression, including image analysis, blood biomarkers, and ecological momentary assessments (EMAs). Among EMAs, user-generated text data, particularly from diary writing, has emerged as a clinically significant and analyzable source for detecting or diagnosing depression, leveraging advancements in large language models such as Chat Generative Pre-trained Transformer (ChatGPT).

Objective:

To detect depression based on user-generated diary words through an emotional writing application utilizing a large language model (LLM). We aimed to validate the value of the semi-structured diary text data as an EMA data source.

Methods:

Individuals who voluntarily participated in the experiment were assessed for depression using the Patient Health Questionnaire and suicide risk using Beck's Suicide Ideation Scale, along with daily diary entries before and after diary writing. The performance of leading LLMs, such as ChatGPT 3.5 and 4, was assessed with and without GPT 3.5 fine-tuning on the training dataset. The model performance comparison involved the use of chain-of-thought and zero-shot prompting to analyze the text structure and content.

Results:

428 diaries from 91 participants were used; GPT 3.5 fine-tuning demonstrated superior performance in depression detection, achieving an accuracy of 0.902 and a specificity of 0.955. However, the balanced accuracy was the highest (0.844) in GPT 3.5 without fine-tuning and prompt techniques; it displayed a sensitivity of 0.929.

Conclusions:

Both GPT 3.5 and GPT 4.0 demonstrated relatively reasonable performance in recognizing the risk of depression based on diary entries. Our findings highlight the potential clinical usefulness of user-generated text data for detecting depression. In addition to measurable indicators, such as step count and physical activity, future research should increasingly emphasize qualitative digital expressions. Clinical Trial: The study methods adhered to the ethical principles outlined in the tenets of the Declaration of Helsinki and were approved by the Institutional Review Board of Korea University Anam Hospital (2023AN0379).


 Citation

Please cite as:

Shin D, Kim H, Lee S, Cho Y, Jung W

Using Large Language Models to Detect Depression From User-Generated Diary Text Data as a Novel Approach in Digital Mental Health Screening: Instrument Validation Study

J Med Internet Res 2024;26:e54617

DOI: 10.2196/54617

PMID: 39292502

PMCID: 11447422

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.