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 AI

Date Submitted: Oct 9, 2024
Date Accepted: Mar 18, 2025

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

Algorithmic Classification of Psychiatric Disorder–Related Spontaneous Communication Using Large Language Model Embeddings: Algorithm Development and Validation

Shewcraft RA, Schwarz J, Micsinai Balan M

Algorithmic Classification of Psychiatric Disorder–Related Spontaneous Communication Using Large Language Model Embeddings: Algorithm Development and Validation

JMIR AI 2025;4:e67369

DOI: 10.2196/67369

PMID: 40605829

PMCID: 12223684

Algorithmic Classification of Psychiatric Disorder Related Spontaneous Communication Using Large Language Model Embeddings:Algorithm Development and Validation

  • Ryan Allen Shewcraft; 
  • John Schwarz; 
  • Mariann Micsinai Balan

ABSTRACT

Background:

Language, which is a crucial element of human communication, is influenced by the complex interplay between thoughts, emotions, and experiences. Psychiatric disorders have an impact on cognitive and emotional processes, which in turn affect the content and way individuals with these disorders communicate using language. The recent rapid rise in performance of large language models (LLMs) suggests that leveraging them for quantitative analysis of language usage has the potential to become a useful method for objectively diagnosing and distinguishing between various psychiatric disorders.

Objective:

Here, we present a novel application of LLMs to analyze patterns of language usage from spontaneous communication related to psychiatric disorders.

Methods:

We utilized embeddings derived from the GRIT-7b LLM for posts originating from subreddits dedicated to seven common conditions: schizophrenia (Scz), borderline personality disorder (BPD), depression (Dep), attention deficit hyperactivity disorder (ADHD), anxiety (Anx), post-traumatic stress disorder (PTSD) and bipolar disorder (Bip). Using these embeddings, we trained a cross-validated, multi-class XGBoost classifier to label which subreddit each post came from.

Results:

The 10-fold cross-validated classifier has weighted average precision, recall, F1, and accuracy scores were of 0.73, 0.68, 0.70 and 0.73, respectively, for the multi-class objective. In a one-versus-rest task, individual category AUCs ranged from 0.89-0.97, with an micro-average one-versus-rest AUC of 0.95.

Conclusions:

Our results suggest that LLMs can provide valuable insights into the linguistic patterns that distinguish between different psychiatric disorders, and that these patterns can be used to develop more objective, efficient, and patient-centered strategies for assessment, monitoring, and research.


 Citation

Please cite as:

Shewcraft RA, Schwarz J, Micsinai Balan M

Algorithmic Classification of Psychiatric Disorder–Related Spontaneous Communication Using Large Language Model Embeddings: Algorithm Development and Validation

JMIR AI 2025;4:e67369

DOI: 10.2196/67369

PMID: 40605829

PMCID: 12223684

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.