https://github.com/sarthakharne/CASE
The limited availability of psychologists necessitates efficient identification of individuals requiring urgent mental healthcare. This study explores the use of Natural Language Processing (NLP) pipelines to analyze text data from online mental health forums used for consultations. By analyzing forum posts, these pipelines can flag users who may require immediate professional attention. A crucial challenge in this domain is data privacy and scarcity. To address this, we propose utilizing readily available curricular texts used in institutes specializing in mental health for pre-training the NLP pipelines. This helps us mimic the training process of a psychologist. Our work presents two models: a discriminative BERT-based model called CASE-BERT that flags potential mental health disorders based on forum text, and a generative model called CASE-Gemma that extracts key features for a preliminary diagnosis. CASE-BERT demonstrates superior performance compared to existing methods, achieving an f1 score of 0.91 for Depression and 0.88 for Anxiety, two of the most commonly reported mental health disorders. CASE-Gemma can achieve a BERT Score of 0.849 on generating diagnoses based on forum text. The effectiveness of CASE-Gemma is evaluated through both human evaluation and qualitative methods, with the collaboration of clinical psychologists who provide us with a set of annotated data for fine-tuning and evaluation. Our code is available at