Employing large language models for emotion detection in psychotherapy transcripts

PurposeIn the context of psychotherapy, emotions play an important role both through their association with symptom severity, as well as their effects on the therapeutic relationship. In this analysis, we aim to train a large language model (LLM) for the detection of emotions in German speech. We wa...

Full description

Saved in:
Bibliographic Details
Main Authors: Christopher Lalk, Kim Targan, Tobias Steinbrenner, Jana Schaffrath, Steffen Eberhardt, Brian Schwartz, Antonia Vehlen, Wolfgang Lutz, Julian Rubel
Format: Article
Language:English
Published: Frontiers Media S.A. 2025-05-01
Series:Frontiers in Psychiatry
Subjects:
Online Access:https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1504306/full
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850187329880195072
author Christopher Lalk
Kim Targan
Tobias Steinbrenner
Jana Schaffrath
Steffen Eberhardt
Brian Schwartz
Antonia Vehlen
Wolfgang Lutz
Julian Rubel
author_facet Christopher Lalk
Kim Targan
Tobias Steinbrenner
Jana Schaffrath
Steffen Eberhardt
Brian Schwartz
Antonia Vehlen
Wolfgang Lutz
Julian Rubel
author_sort Christopher Lalk
collection DOAJ
description PurposeIn the context of psychotherapy, emotions play an important role both through their association with symptom severity, as well as their effects on the therapeutic relationship. In this analysis, we aim to train a large language model (LLM) for the detection of emotions in German speech. We want to apply this model on a corpus of psychotherapy transcripts to predict symptom severity and alliance aiming to identify the most important emotions for the prediction of symptom severity and therapeutic alliance.MethodsWe employed a public labeled dataset of 28 emotions and translated the dataset into German. A pre-trained LLM was then fine-tuned on this dataset for emotion classification. We applied the fine-tuned model to a dataset containing 553 psychotherapy sessions of 124 patients. Using machine learning (ML) and explainable artificial intelligence (AI), we predicted symptom severity and alliance by the detected emotions.ResultsOur fine-tuned model achieved modest classification performance (F1macro =0.45, Accuracy=0.41, Kappa=0.42) across the 28 emotions. Incorporating all emotions, our ML model showed satisfying performance for the prediction of symptom severity (r = .50; 95%-CI:.42,.57) and moderate performance for the prediction of alliance scores (r = .20; 95%-CI:.06,.32). The most important emotions for the prediction of symptom severity were approval, anger, and fear. The most important emotions for the prediction of alliance were curiosity, confusion, and surprise.ConclusionsEven though the classification results were only moderate, our model achieved a good performance especially for prediction of symptom severity. The results confirm the role of negative emotions in the prediction of symptom severity, while they also highlight the role of positive emotions in fostering a good alliance. Future directions entail the improvement of the labeled dataset, especially with regards to domain-specificity and incorporating context information. Additionally, other modalities and Natural Language Processsing (NLP)-based alliance assessment could be integrated.
format Article
id doaj-art-12d3014cbdfb4f42a70c00590d07f4d6
institution OA Journals
issn 1664-0640
language English
publishDate 2025-05-01
publisher Frontiers Media S.A.
record_format Article
series Frontiers in Psychiatry
spelling doaj-art-12d3014cbdfb4f42a70c00590d07f4d62025-08-20T02:16:09ZengFrontiers Media S.A.Frontiers in Psychiatry1664-06402025-05-011610.3389/fpsyt.2025.15043061504306Employing large language models for emotion detection in psychotherapy transcriptsChristopher Lalk0Kim Targan1Tobias Steinbrenner2Jana Schaffrath3Steffen Eberhardt4Brian Schwartz5Antonia Vehlen6Wolfgang Lutz7Julian Rubel8Department of Psychology, Osnabrück University, Osnabrück, GermanyDepartment of Psychology, Osnabrück University, Osnabrück, GermanyDepartment of Psychology, Osnabrück University, Osnabrück, GermanyDepartment of Psychology, University of Trier, Trier, GermanyDepartment of Psychology, University of Trier, Trier, GermanyDepartment of Psychology, University of Trier, Trier, GermanyDepartment of Psychology, University of Trier, Trier, GermanyDepartment of Psychology, University of Trier, Trier, GermanyDepartment of Psychology, Osnabrück University, Osnabrück, GermanyPurposeIn the context of psychotherapy, emotions play an important role both through their association with symptom severity, as well as their effects on the therapeutic relationship. In this analysis, we aim to train a large language model (LLM) for the detection of emotions in German speech. We want to apply this model on a corpus of psychotherapy transcripts to predict symptom severity and alliance aiming to identify the most important emotions for the prediction of symptom severity and therapeutic alliance.MethodsWe employed a public labeled dataset of 28 emotions and translated the dataset into German. A pre-trained LLM was then fine-tuned on this dataset for emotion classification. We applied the fine-tuned model to a dataset containing 553 psychotherapy sessions of 124 patients. Using machine learning (ML) and explainable artificial intelligence (AI), we predicted symptom severity and alliance by the detected emotions.ResultsOur fine-tuned model achieved modest classification performance (F1macro =0.45, Accuracy=0.41, Kappa=0.42) across the 28 emotions. Incorporating all emotions, our ML model showed satisfying performance for the prediction of symptom severity (r = .50; 95%-CI:.42,.57) and moderate performance for the prediction of alliance scores (r = .20; 95%-CI:.06,.32). The most important emotions for the prediction of symptom severity were approval, anger, and fear. The most important emotions for the prediction of alliance were curiosity, confusion, and surprise.ConclusionsEven though the classification results were only moderate, our model achieved a good performance especially for prediction of symptom severity. The results confirm the role of negative emotions in the prediction of symptom severity, while they also highlight the role of positive emotions in fostering a good alliance. Future directions entail the improvement of the labeled dataset, especially with regards to domain-specificity and incorporating context information. Additionally, other modalities and Natural Language Processsing (NLP)-based alliance assessment could be integrated.https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1504306/fullnatural language processingcomputational psychotherapy researchmachine learningexplainable artificial intelligencesymptom severityalliance
spellingShingle Christopher Lalk
Kim Targan
Tobias Steinbrenner
Jana Schaffrath
Steffen Eberhardt
Brian Schwartz
Antonia Vehlen
Wolfgang Lutz
Julian Rubel
Employing large language models for emotion detection in psychotherapy transcripts
Frontiers in Psychiatry
natural language processing
computational psychotherapy research
machine learning
explainable artificial intelligence
symptom severity
alliance
title Employing large language models for emotion detection in psychotherapy transcripts
title_full Employing large language models for emotion detection in psychotherapy transcripts
title_fullStr Employing large language models for emotion detection in psychotherapy transcripts
title_full_unstemmed Employing large language models for emotion detection in psychotherapy transcripts
title_short Employing large language models for emotion detection in psychotherapy transcripts
title_sort employing large language models for emotion detection in psychotherapy transcripts
topic natural language processing
computational psychotherapy research
machine learning
explainable artificial intelligence
symptom severity
alliance
url https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1504306/full
work_keys_str_mv AT christopherlalk employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT kimtargan employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT tobiassteinbrenner employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT janaschaffrath employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT steffeneberhardt employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT brianschwartz employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT antoniavehlen employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT wolfganglutz employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts
AT julianrubel employinglargelanguagemodelsforemotiondetectioninpsychotherapytranscripts