DynaMentA
Dynamic Prompt Engineering and Weighted Transformer Architecture for Mental Health Classification Using Social Media Data
Bibliographic Data
| ID | 22109001 |
|---|---|
| Authors | Akshi Kumar (0000-0003-4263-7168, Goldsmiths University of London), Aditi Sharma (0000-0003-3778-4171, Thapar Institute of Engineering & Technology), Saurabh Raj Sangwan (0000-0002-0832-0362, Machine Intelligence Research Institute) |
| Year | 2025 |
| Volume | 12 |
| Issue | 6 |
| Pages | 4193-4203 |
| Publication date | 2025-12-01 |
| Open Access | Yes |
| Type | ARTICLE |
| Venue | IEEE Transactions on Computational Social Systems (JOURNAL) |
| Journal identifiers | ISSN: 2329-924X • E-ISSN: 2373-7476 |
| Publisher | Institute of Electrical and Electronics Engineers (IEEE) (PUBLISHER) |
| DOI | 10.1109/tcss.2025.3569400 |
| OpenAlex | W4411019674 |
| Language | EN |
| References cited | 20 |
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 article introduces dynamic prompt engineering and weighted transformer architecture dynamic prompt engineering and weighted transformer architecture for mental health classification (DynaMentA), a novel dual-layer transformer framework that integrates the strengths of BioGPT and decoding-enhanced BERT with disentangled attention (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, suicide versus depression classification natural language (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
Computer security · Data mining · Data science · Electrical engineering · Geography · Mental health · Psychiatry · Social media · Transformer · World Wide Web · Complex Network Analysis Techniques · Computer Science · Engineering · Mental Health Research Topics · Psychology · Sentiment Analysis and Opinion Mining · Architecture · Artificial Intelligence
| Highly cited | No |
|---|