DynaMentA: Dynamic Prompt Engineering and Weighted Transformer Architecture for Mental Health Classification using Social Media Data
Kumar, Akshi; Sharma, Aditi and Sangwan, Saurabh Raj. 2025. DynaMentA: Dynamic Prompt Engineering and Weighted Transformer Architecture for Mental Health Classification using Social Media Data. IEEE Transactions on Computational Social Systems, ISSN 2329-924X [Article] (In Press)
![]() |
Text
TCSS_Final.pdf - Accepted Version Download (861kB) |
Abstract or Description
Mental health classification is inherently challenging, requiring models to capture complex emotional and linguistic patterns. Although large language models (LLMs) such as ChatGPT, Mental-Alpaca, and MentaLLaMA show promise, they are not trained on clinically grounded data and often overlook subtle psychological cues. Their predictions tend to overemphasize emotional intensity, while failing to capture contextually relevant indicators that are critical for accurate mental health assessment. This paper introduces DynaMentA (Dynamic Prompt Engineering and Weighted Transformer Architecture), a novel dual-layer transformer framework that integrates the strengths of BioGPT and DeBERTa to address these challenges. BioGPT captures fine-grained biomedical indicators, while DeBERTa provides context-aware disambiguation. The ensemble mechanism dynamically weights their outputs, guided by a simulated feedback loop that refines the predictions during training. Unlike previous studies that treat classification statically, DynaMentA incorporates dynamic prompt engineering to better align with evolving linguistic and emotional signals. Evaluated on three benchmark datasets, DepSeverity, SDCNL, and Dreaddit, DynaMentA achieves precision of 92.6\%, 91.9\% F1-score and 0.94 AUC-ROC, consistently outperforming the existing benchmark, including general-purpose LLMs and domain-specific mental health models. This scalable and interpretable framework establishes a state-of-the-art methodology for computational mental health analysis in high-stakes applications, such as suicide risk assessment and crisis intervention and early detection of severe depressive episodes.
Item Type: |
Article |
||||||
Identification Number (DOI): |
|||||||
Additional Information: |
“© 2025 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.” |
||||||
Keywords: |
Mental Health Classification, Weighted Transformer Models, Social Media Data Analysis, Deep Learning for Social Systems, AI in Mental Health |
||||||
Departments, Centres and Research Units: |
|||||||
Dates: |
|
||||||
Item ID: |
38977 |
||||||
Date Deposited: |
10 Jun 2025 09:07 |
||||||
Last Modified: |
10 Jun 2025 09:07 |
||||||
Peer Reviewed: |
Yes, this version has been peer-reviewed. |
||||||
URI: |
View statistics for this item...
![]() |
Edit Record (login required) |