Hostname: page-component-7b7567c8c-2n9c9 Total loading time: 0 Render date: 2026-11-15T08:54:37.836Z Has data issue: false hasContentIssue false

A pipeline for automatic bipolar disorder analysis through anonymization and LLM-as-a-judge

Published online by Cambridge University Press:  31 July 2026

A. Tremopoulos
Affiliation:
Polytechnic University of Catalonia (UPC)
M. De Prisco
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
A. Mas-Musons
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
C. Valenzuela-Pascual
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
M. Korniyenko
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
V. Oliva
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
G. Fico
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
J. Raduà
Affiliation:
Imaging of Mood- and Anxiety-Related Disorders (IMARD) group, IDIBAPS, Barcelona, Spain., Barcelona, Spain
E. Vieta
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
G. Anmella*
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
D. Hidalgo-Mazzei
Affiliation:
Hospital Clínic of Barcelona, Bipolar and Depressive Disorders Unit, IDIBAPS, CIBERSAM, University of Barcelona, Barcelona, Spain
C. Escolano
Affiliation:
Polytechnic University of Catalonia (UPC)
*
*Corresponding author.

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.
Introduction

Bipolar Disorder (BD) is a psychiatric condition characterized by marked shifts in mood, energy, and thought processes, manifested in episodes of mania, depression, and euthymia. Despite advances in digital psychiatry, few studies have systematically assessed the potential of Large Language Models (LLMs) to analyze real clinical interviews in BD, particularly in multiple languages.

Objectives

This work presents a pipeline designed to (1) anonymize real psychiatric interviews while preserving clinical information, and (2) evaluate the capabilities of an open-source LLM, Qwen2-Audio, to classify affective states and their severity in BD.

Methods

A dataset of 41 audio recordings in Spanish and Catalan was used, covering different illness phases. A complete anonymization pipeline was developed to remove sensitive information from transcripts while extracting audio embeddings from the LLM’s internal representation. These embeddings were explored in latent space to assess separability of affective states. A structured chain-of-thought (CoT) prompting strategy was then implemented, asking the model symptom-based clinical questions to emulate psychiatric reasoning. Multiple input modalities (audio, text, audio+text, and full transcripts) and prompt strategies were compared across sessions.

Results

The anonymization pipeline effectively protected patient confidentiality while enabling the use of real clinical data. Audio embeddings revealed meaningful differences between affective states within the same patient. Prompt design strongly influenced performance, with CoT prompting reducing hallucinations and improving consistency. Audio input achieved the best performance for depression (recall = 88.41%), full-text input was most effective for mania detection (F1 = 59%), while euthymia remained challenging (max F1 = 46.2%). Severity predictions were more accurate for higher severity levels (e.g., moderate depression F1 ≈ 70%, severe mania F1 = 53.2%).

Conclusions

This work demonstrates the feasibility of combining anonymization pipelines, real psychiatric data, and open-source multimodal LLMs for BD analysis. By jointly evaluating depression, mania, and euthymia, and by applying structured CoT reasoning, the study fills an important gap in the literature and provides a reproducible, privacy-preserving framework for future research in digital psychiatry.

Disclosure of Interest

None Declared

Information

Type
Abstract
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution, and reproduction in any medium, provided the original work is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of European Psychiatric Association
Submit a response

Comments

No Comments have been published for this article.