Research Article | Open Access | CC Attribution Non-commercial | Published online: 31 March 2026 PHQ-9 Based Depression Detection Using Text with Multi-Task DeBERTa Model

Rahul Dagade,1,* Saee Darwatkar,1 Payal Kalekar,1 Aditya Kamble,1 Prasad Hargude,1 Nisha Godha2 and Ganesh Jadhav3

1 Department of Computer Engineering, Vishwakarma Institute of Technology, Pune, Maharashtra, 411037, India

2 Department of Electrical Engineering, Sinhgad Institutes, Pune, Maharashtra, 411046, India

3 Department of Information Technology, Vishwakarma Institute of Technology, Pune, Maharashtra, 411037, India

*Email: rahul.dagade@vit.edu (R. Dagade)

J. Smart Sens. Comput., 2026, 2(1), 26205    https://doi.org/10.64189/ssc.26205

Received: 13 February 2026; Revised: 17 March 2026; Accepted: 29 March 2026

Abstract

Depression is a widespread mental health disorder that adversely affects emotional well-being, cognitive functioning, and overall quality of life. Early and accurate detection is essential for timely intervention; however, traditional screening methods such as the Patient Health Questionnaire-9 (PHQ-9) are often limited by accessibility and resource constraints. To address these challenges, this study proposes a text-based automated depression screening system that predicts both PHQ-9 scores and depression severity levels from user-generated free-form text.The proposed approach utilizes DeBERTa-V3, a state-of-the-art transformer model, within a multi-task learning framework that simultaneously performs regression and multi-class classification. The model was trained on the PHQ-TextSet dataset, a synthetically constructed and PHQ-9-aligned corpus comprising 3,235 annotated samples across five severity categories. By leveraging disentangled attention and shared contextual representations, the system effectively captures nuanced linguistic and emotional patterns.Experimental results demonstrate high performance, achieving 99.85% classification accuracy, a macro F1-score of 0.9984, a weighted AUC of 0.96, and a Mean Absolute Error of 1.2495 for PHQ-9 score prediction. However, these results should be interpreted as an upper-bound estimate due to the structured and controlled nature of the dataset, which differs from real-world, noisy text inputs.The model is deployed as a real-time inference system using FastAPI, highlighting its practical applicability in digital mental health platforms, telemedicine systems, and educational wellness tools. This work presents a scalable and accessible alternative to traditional screening methods while maintaining alignment with clinical assessment standards. Future work will focus on evaluating the model on real-world datasets, enhancing robustness, incorporating multimodal data, and improving interpretability to support responsible AI deployment in mental healthcare.

Keywords:

Graphical Abstract

Novelty statement

DeBERTa-V3 based multitask model using the PHQ-TextSet dataset predicts PHQ-9 scores and depression severity from text, enabling real-time, non-intrusive mental health screening.