Source-linked AI summary

MentaLLaMA: Interpretable Mental Health Analysis on Social Media with Large Language Models

Kailai Yang, Tianlin Zhang, Ziyan Kuang, Qianqian Xie, Jimin Huang, Sophia Ananiadou

arXiv:2309.13567v3cs.CL

TL;DR

Interpretable mental health analysis needs reliable explanations, but existing discriminative models lack interpretability and closed-source LLMs remain weak in zero- and few-shot classification. The paper builds the 105K-sample IMHI dataset and trains open-source MentaLLaMA models, which approach state-of-the-art correctness and generate high-quality explanations. However, the authors note limitations in domain-specific knowledge and automatic evaluation reliability.

  • Problem

    Existing discriminative methods have low interpretability, while closed-source LLMs struggle to match state-of-the-art classification performance in zero-shot and few-shot settings.

  • Method

    The paper constructs the 105K-sample multi-task, multi-source IMHI dataset using ChatGPT-generated explanations and trains LLaMA2-based MentaLLaMA models with instruction tuning.

  • Results

    MentaLLaMA approaches state-of-the-art discriminative methods in correctness and generates explanations on par with ChatGPT across the IMHI benchmark.

  • Takeaways & Limitations

    MentaLLaMA provides an open-source instruction-following model series for interpretable mental health analysis across multiple tasks and unseen tasks.

  • Takeaways & Limitations

    The models lack domain-specific knowledge compared with ChatGPT, and BART-score has only moderate correlation with human evaluation for these explanations.

Abstract

from arXiv · show

With the development of web technology, social media texts are becoming a rich source for automatic mental health analysis. As traditional discriminative methods bear the problem of low interpretability, the recent large language models have been explored for interpretable mental health analysis on social media, which aims to provide detailed explanations along with predictions. The results show that ChatGPT can generate approaching-human explanations for its correct classifications. However, LLMs still achieve unsatisfactory classification performance in a zero-shot/few-shot manner. Domain-specific finetuning is an effective solution, but faces 2 challenges: 1) lack of high-quality training data. 2) no open-source LLMs for interpretable mental health analysis were released to lower the finetuning cost. To alleviate these problems, we build the first multi-task and multi-source interpretable mental health instruction (IMHI) dataset on social media, with 105K data samples. The raw social media data are collected from 10 existing sources covering 8 mental health analysis tasks. We use expert-written few-shot prompts and collected labels to prompt ChatGPT and obtain explanations from its responses. To ensure the reliability of the explanations, we perform strict automatic and human evaluations on the correctness, consistency, and quality of generated data. Based on the IMHI dataset and LLaMA2 foundation models, we train MentalLLaMA, the first open-source LLM series for interpretable mental health analysis with instruction-following capability. We also evaluate the performance of MentalLLaMA on the IMHI evaluation benchmark with 10 test sets, where their correctness for making predictions and the quality of explanations are examined. The results show that MentalLLaMA approaches state-of-the-art discriminative methods in correctness and generates high-quality explanations.

1 INTRODUCTION

Interpretable mental health analysis on social media addresses the limits of manual analysis, discriminative models, and zero-/few-shot LLMs. The paper introduces the IMHI dataset and MentaLLaMA to support open-source instruction-following analysis with predictions and explanations.

  • Motivation: Social media provides rich mental health signals, but the volume of posts makes manual analysis impractical.NLP methods are therefore used for automatic analysis.
  • Motivation: Traditional discriminative methods provide limited interpretability and often generalize poorly to unseen tasks and multi-task settings.PLMs achieve strong task-specific performance but their decisions are difficult to understand.
  • Motivation: ChatGPT generates approaching-human explanations for correct classifications, but performs worse than state-of-the-art supervised methods in zero-shot and few-shot classification.Low precision can also reduce explanation quality through inaccurate reasoning.
  • Contributions: The IMHI dataset contains 105K instruction-tuning samples collected from 10 sources covering 8 mental health analysis tasks.It is presented as the first multi-task and multi-source instruction-tuning dataset for interpretable mental health analysis on social media.
  • Contributions: MentaLLaMA is an open-source LLaMA2-based instruction-following LLM series for interpretable mental health analysis.The models target both prediction correctness and explanation quality, with evaluations using a benchmark covering 10 test sets.
  • Results: MentaLLaMA-chat-13B surpasses or approaches state-of-the-art discriminative methods on 7 of 10 test sets, while MentaLLaMA explanations are on par with ChatGPT.The models also show strong generalizability to unseen tasks.

2 TASK FORMALIZATION

The paper formulates interpretable mental health analysis as a multi-task text-generation problem. A generative model receives a target post and query, then produces both an answer and a natural-language rationale, optimized through conditional language modeling.

  • Task Formalization: Interpretable mental health analysis is modeled as generation rather than a purely discriminative prediction task.The formulation targets simultaneous mental health analysis and explanation generation.
  • Task Formalization: Each task consists of context-target pairs whose query contains the target post and question, while the response contains an answer and rationale.Responses may include a classification result and an explanation of the decision.
  • Task Formalization: The training dataset merges the context-target subsets from all N mental health analysis tasks.The merged dataset is denoted D = ∪_t=1,...,N D_t.

3 IMHI DATASET

The IMHI dataset is constructed from 10 mental health analysis datasets, using ChatGPT prompted with expert examples and annotations to generate explanations that undergo automatic and human quality evaluation.

  • Dataset Construction: The dataset construction process comprises raw data collection, ChatGPT explanation generation, explanation evaluation, and instruction construction.The collected data come from multiple social media sources, including Reddit, Twitter, and SMS texts.
  • Dataset Construction: The 10 source datasets cover binary detection, multi-class detection, mental health cause or factor detection, and mental risk or wellness factor detection.Examples include depression, stress, loneliness, PTSD, anxiety, social relationships, medication, work pressure, and interpersonal risk factors.
  • Explanation Generation: Domain experts write task-specific instructions and explanation examples, which are combined with dataset annotations to prompt ChatGPT for target-post explanations.The prompts include two randomly sampled expert explanations per class and use the format [label] Reasoning: [explanation].
  • Explanation Evaluation: The generated explanations are evaluated for correctness, consistency, and psychological quality through automatic evaluation of all 105K samples and human evaluation of a subset.Human evaluation rates consistency, reliability, professionality, and overall effectiveness on a 0-to-3 scale.
  • Explanation Evaluation: 7 out of 10 datasets achieve agreement percentages above 90% between dataset annotations and ChatGPT predictions, while T-SID remains below 70%.The paper attributes disagreements partly to subjectivity and weakly supervised annotations.
  • Explanation Evaluation: All consistency classifiers achieve weighted F1 scores above 93.5% on test-split responses, and few-shot prompting significantly improves BART-score over zero-shot prompting.ChatGPT explanations also receive mostly over 2.5 consistency and over 2.0 reliability scores in human evaluation.

4 MENTALLAMA TRAINING

The authors fine-tune LLaMA2 models on IMHI to build three MentaLLaMA variants, selecting the 7B model using validation performance and training models on four A100 GPUs.

  • Model Training: MentaLLaMA-7B is trained on the IMHI training set for 10 epochs, with the best checkpoint selected using the IMHI validation set.Training uses batch size 32, gradient accumulation of 8, and a maximum learning rate of 1e-5 with warm-up.
  • Model Training: All models are trained on 4 Nvidia Tesla A100 GPUs with 80GB of memory each.An additional LLaMA2-7B model is trained on IMHI-completion for fair comparison with completion-based baselines.

5 IMHI EVALUATION BENCHMARK

The IMHI evaluation benchmark uses test splits from the collected datasets, dividing them into 10 source-based subsets and assessing both prediction correctness and explanation quality.

  • Benchmark Construction: The benchmark is built from the test splits of the collected mental health analysis datasets.Because each dataset requires different evaluation metrics, the test data are divided according to data source.
  • Benchmark Construction: The evaluation benchmark contains 10 subsets corresponding to the different data sources and metric settings.The benchmark statistics are reported in Table 1.
  • Evaluation Criteria: Model responses are evaluated on prediction correctness and explanation quality.Correctness is modeled as classification and measured using weighted F1 scores against reference labels.

6 EXPERIMENTS AND ANALYSIS

The experiments compare MentaLLaMA with discriminative, prompting, and completion-based baselines on correctness, explanation quality, generalizability, and human-rated explanation quality. MentaLLaMA improves explanation quality through instruction tuning and model scaling, generalizes to unseen tasks, and produces generally high-quality explanations, while automatic metrics have limited reliability and professionality remains weaker than ChatGPT.

  • Correctness: MentalBERT and MentalRoBERTa achieve state-of-the-art correctness on 8 of 10 test sets, while ChatGPT zero-shot outperforms LLaMA2 zero-shot on all 10.Few-shot ChatGPT and GPT-4 further outperform zero-shot ChatGPT across all test sets.
  • Explanation quality: MentaLLaMA substantially improves explanation quality over zero-shot LLaMA2-7B on all 10 test sets through instruction tuning.MentaLLaMA-chat-7B improves over MentaLLaMA-7B on all 10 test sets, with gains above 0.2 on 6; chat-13B exceeds chat-7B by over 0.2 on 8 of 10.
  • Explanation quality: MentaLLaMA models achieve explanation quality comparable to few-shot ChatGPT and GPT-4 on most test sets despite much smaller model sizes.ChatGPT has comparable correctness and quality to GPT-4 at substantially lower inference cost, supporting its use for large-scale IMHI data construction.
  • Generalizability: MentaLLaMA models significantly outperform LLaMA2-13B zero-shot on all unseen-task datasets and outperform ChatGPT zero-shot on 3 datasets.The unseen-task evaluation excludes Dreaddit, T-SID, CAMS, and IRF from IMHI training.
  • Generalizability: MentaLLaMA-chat models outperform T5 and BART on several unseen tasks and remain stronger on a Twitter-derived test set despite excluding Twitter training data.Chat-13B further improves explanation quality over chat-7B on unseen tasks, indicating a benefit from model-size expansion.
  • Human evaluation: Human evaluations of 200 MentaLLaMA-chat-13B outputs exceed average scores of 2.2 on all four aspects, but professionality is significantly below ChatGPT.MentaLLaMA is comparable to ChatGPT in consistency and reliability, while the authors suggest continual pre-training on high-quality mental-health data as a possible remedy.

7 CONCLUSION AND FUTURE WORK

The paper introduces MentaLLaMA and the IMHI dataset for interpretable mental health analysis, reporting strong correctness, explanation quality, and generalizability. It also identifies domain-specific knowledge and automatic evaluation reliability as limitations for future work.

  • MentaLLaMA is an open-source LLM series for interpretable mental health analysis with instruction-following capability.It is trained using the 105K-sample IMHI dataset.
  • MentaLLaMA approaches state-of-the-art discriminative methods in correctness and generates human-level explanations.
  • MentaLLaMA shows high generalizability to unseen tasks.
  • MentaLLaMA lacks domain-specific knowledge compared with powerful models such as ChatGPT.The authors propose continual pre-training on high-quality mental health-related data to improve explanation professionality.
  • BART-score has only moderate correlation with human evaluations, limiting the reliability of the conclusions.The authors plan to develop more reliable automatic evaluation metrics.

8 ETHICAL CONSIDERATIONS

The paper describes privacy and ethical protections for public social-media data while restricting MentaLLaMA’s use to non-clinical research. It also highlights bias, incorrect predictions, inappropriate explanations, and overgeneralization as risks for real-world monitoring.

  • The authors follow privacy protocols and ethical principles to protect user privacy and anonymize mental health-related texts.Paper examples are paraphrased and obfuscated to minimize misuse.
  • MentaLLaMA’s predictions and explanations should be used only for non-clinical research.People seeking help should consult professional psychiatrists or clinical practitioners.
  • Potential risks include LLM bias, incorrect predictions, inappropriate explanations, and overgeneralization.The paper specifically notes potential gender gaps among LLM biases.
  • These risks leave substantial challenges for applying LLMs to real-scenario mental health monitoring systems.

A.1 Mental Health Analysis on Social Media

Prior mental health analysis methods rely mainly on discriminative PLM-based classification, while interpretability has been addressed through additional features and knowledge. Open-source instruction-tuned LLMs provide a foundation for domain-specific mental health models.

  • Previous methods mainly formulate mental health analysis as text classification using fine-tuned PLMs such as BERT and RoBERTa.Some studies pre-train models from scratch on large-scale mental health-related social-media data.
  • Black-box models achieve strong classification performance but provide limited interpretability.Interpretability-oriented methods add metaphor mappings, PHQ-9 information, or commonsense knowledge graphs.
  • Closed-source LLM availability affects research-community development, motivating efforts to democratize LLMs.
  • Open-source LLaMA-based models replicate instruction-following ability through large-scale instruction tuning.
  • Domain-specific instruction tuning improves LLM performance in areas such as biomedicine and finance.Examples include MedAlpaca and Pixiu.

B HUMAN ANNOTATION SCHEME

The human annotation scheme evaluates generated explanations for consistency, reliability, and professionality, then combines these dimensions into an overall score. Professional evaluation uses expert-ranked depression symptoms as reference evidence.

  • Annotation dimensions: Annotators assess generated explanations against expert-written explanations as the correct reference.
  • Annotation dimensions: Consistency measures whether explanations coherently support their classification results and remain well-structured.
  • Annotation dimensions: Reliability measures whether explanations are trustworthy, factual, and free from misinformation or wrong reasoning.Scores range from completely unreliable factual hallucination to completely reliable information.
  • Annotation dimensions: Professionality measures the psychological rationality of supporting evidence against expert-specified depression symptoms.The symptoms are sorted by criticality, including suicide ideation, self-harm ideation, depressed mood, and self-guilt ideation.
  • Professionality scoring: Professionality scores range from 0 when critical evidence is missing to 3 when all related supporting evidence is included.
  • Overall scoring: Overall performance combines consistency, reliability, and professionality into a 0–3 score.Excellent performance requires all three dimensions to receive the maximum score.

C.1 Templates for IMHI Dataset

Table 4 presents templates for constructing prompts for the IMHI and IMHI-completion datasets.

  • Table 4 presents templates for constructing prompts for the IMHI dataset.
  • The templates also support construction of the IMHI-completion dataset.
  • The section documents prompt-construction templates for both datasets.

C.2 Disagreement Examples of ChatGPT

The section presents examples of ChatGPT’s disagreements with annotated labels and examples of prompts used for ChatGPT.

  • Table 5 provides examples of ChatGPT’s disagreements with annotated labels.
  • The paper is titled MentaLLaMA: Interpretable Mental Health Analysis on Social Media with Large Language Models.
  • Table 6 presents examples of prompts used for ChatGPT.
Loading 2309.13567v3…