AUTOMATED DETECTION OF DEPRESSION AND PTSD FROM CLINICAL TEXT USING MENTALBERT (AN EMPIRICAL STUDY ON THE DAIC-WOZ CORPUS)
Description
Major depressive disorder (MDD) and post-traumatic stress disorder (PTSD) represent a substantial global public health burden. According to the World Health Organization (2023), depression affects over 280 million people worldwide, while PTSD has a lifetime prevalence of approximately 3.9% in the general population. Despite this, both conditions remain systematically underdiagnosed, largely because the diagnostic process depends on specialised clinical expertise, structured interviewing, and validated instruments that are not universally accessible. This study evaluates a transformer-based natural language processing (NLP) approach to the automated classification of MDD and PTSD from transcribed clinical interviews. We apply fine-tuning of MentalBERT (Ji et al., 2022) — a domain-specific language model pre-trained on psychiatric text — to the DAIC-WOZ corpus (Gratch et al., 2014), which comprises 189 semi-structured clinical interviews annotated with PHQ-8 scores for depression and PCL-C scores for PTSD. The approach is evaluated against two established baselines: TF-IDF with a Support Vector Machine classifier, and BioBERT. Decision interpretability is provided through post-hoc SHAP analysis (Lundberg & Lee, 2017). MentalBERT outperforms both baselines across all metrics: it achieves a macro F1-score of 0.79 for MDD and 0.74 for PTSD on the held-out test set, with corresponding AUC-ROC values of 0.87 and 0.82. SHAP analysis identifies cohesive clusters of linguistically meaningful tokens — expressions of hopelessness and social withdrawal for MDD, and re-experiencing and active avoidance patterns for PTSD — that align consistently with DSM-5-TR diagnostic criteria. Taken together, these findings support the potential of domain-adapted transformer models as decision-support instruments in psychiatric screening, while underscoring the importance of clinical oversight and prospective validation before any applied use. Keywords: major depressive disorder; PTSD; natural language processing; transformer models; MentalBERT; DAIC-WOZ; automated classification; psychiatric screening; SHAP; interpretability