Real‐Time Anxiety and Depression Detection by Combining Large Language Models and Machine Learning With Explainability Capabilities on a User‐Centric, Engaging Conversational Assistant

ABSTRACT Mental well‐being is a worldwide priority of health systems. Nevertheless, the diagnosis and recovery rates are still low. This work demonstrates an Artificial Intelligence (AI)‐based, entertainment‐oriented, engaging assistant that can deliver on‐demand, non‐judgmental assessment in an accessible, scalable, and personalised way to people affected by anxiety and depression. For this purpose, we combine Machine Learning (ML) and Large Language Models (LLMs) in a stream‐based framework. Here, the LLMs are exploited to extract high‐level reasoning features from natural language utterances for an accurate ML prediction model. During a study lasting for 14 months, the participants, 146 users mostly within the 65–80 age range, used the conversational assistant. Each user was free to participate as they pleased, with average individual activity times of 4.5 months. During their participation, each user completed an average of two standard mental condition tests, which allowed updating the mental condition tags for classifier retraining in streaming mode. Our solution achieved promising results for detecting anxiety and depression in free dialogues, with accuracy metrics exceeding 90%, outperforming competing works from the literature. Moreover, prior research on anxiety and depression detection has often been limited to providing binary outcomes without explanations behind their rationale. Therefore, this work also addresses interpretability by automatically explaining its prediction in natural language. The contributions of this work are threefold: (i) detecting mental conditions from free dialogues in real‐time with minimal supervision, (ii) conducting a non‐invasive longitudinal analysis based on user engagement, and (iii) automatically providing explanations of the predictive capabilities of the solution. Our approach, supporting continuous interactions suitable for longitudinal studies, combined with explainability mechanisms, connects directly with several strategic lines promoted by the European Union (EU). In particular, the emphasis on early prevention and detection is aligned with a conversational tool that monitors indicators over time. Similarly, the EU promotes transparency, ethical governance, and trust in digital health technologies, as well as data interoperability and common standards as part of the push toward the European Health Data Space. In this context, incorporating explainability, that is, providing the user or researcher with understandable reasons for the model's inferences, strengthens acceptability, accountability, and alignment with good digital governance principles. In this way, our approach contributes to translating the European objectives of promoting accessible, safe, ethical, and evidence‐based digital mental health tools into practice, while facilitating longitudinal monitoring and proactive intervention.

Authors

Institutions

Publication Details

Journal
Expert Systems
Published
2026-02-24
DOI
https://doi.org/10.1111/exsy.70229
Primary Topic
Mental Health via Writing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Real‐Time Anxiety and Depression Detection by Combining Large Language Models and Machine Learning With Explainability Capabilities on a User‐Centric, Engaging Conversational Assistant

Francisco De Arriba Perez, Francisco Javier González Castaño, Silvia García Méndez, Julen Beiro Suso
Expert Systems
Mental Health via Writing
article

Real‐Time Anxiety and Depression Detection by Combining Large Language Models and Machine Learning With Explainability Capabilities on a User‐Centric, Engaging Conversational Assistant

Francisco De Arriba Perez, Francisco Javier González Castaño, Silvia García Méndez, Julen Beiro Suso
article en

Abstract

ABSTRACT Mental well‐being is a worldwide priority of health systems. Nevertheless, the diagnosis and recovery rates are still low. This work demonstrates an Artificial Intelligence (AI)‐based, entertainment‐oriented, engaging assistant that can deliver on‐demand, non‐judgmental assessment in an accessible, scalable, and personalised way to people affected by anxiety and depression. For this purpose, we combine Machine Learning (ML) and Large Language Models (LLMs) in a stream‐based framework. Here, the LLMs are exploited to extract high‐level reasoning features from natural language utterances for an accurate ML prediction model. During a study lasting for 14 months, the participants, 146 users mostly within the 65–80 age range, used the conversational assistant. Each user was free to participate as they pleased, with average individual activity times of 4.5 months. During their participation, each user completed an average of two standard mental condition tests, which allowed updating the mental condition tags for classifier retraining in streaming mode. Our solution achieved promising results for detecting anxiety and depression in free dialogues, with accuracy metrics exceeding 90%, outperforming competing works from the literature. Moreover, prior research on anxiety and depression detection has often been limited to providing binary outcomes without explanations behind their rationale. Therefore, this work also addresses interpretability by automatically explaining its prediction in natural language. The contributions of this work are threefold: (i) detecting mental conditions from free dialogues in real‐time with minimal supervision, (ii) conducting a non‐invasive longitudinal analysis based on user engagement, and (iii) automatically providing explanations of the predictive capabilities of the solution. Our approach, supporting continuous interactions suitable for longitudinal studies, combined with explainability mechanisms, connects directly with several strategic lines promoted by the European Union (EU). In particular, the emphasis on early prevention and detection is aligned with a conversational tool that monitors indicators over time. Similarly, the EU promotes transparency, ethical governance, and trust in digital health technologies, as well as data interoperability and common standards as part of the push toward the European Health Data Space. In this context, incorporating explainability, that is, providing the user or researcher with understandable reasons for the model's inferences, strengthens acceptability, accountability, and alignment with good digital governance principles. In this way, our approach contributes to translating the European objectives of promoting accessible, safe, ethical, and evidence‐based digital mental health tools into practice, while facilitating longitudinal monitoring and proactive intervention.

Expert SystemsVol. 43(4)
Universidade de Vigo (ES)
Quality Education
Openalex Percentile: Top 48%
Mental Health via Writing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.