/ Модель

Характеристики

Контекст
512 токенов
Параметры
137 млн
Архитектура
bert · dense
Базовая модель
mental-bert-base-uncased
Опубликована
10 мар 2025

mental_health_classifier

Классификация текстаТекст → label3 профессии

Англоязычная модель на базе BERT классифицирует тексты о психическом здоровье для анализа тональности и выявления возможных признаков дистресса.

295скачиваний за 30 дней0лайковвеса обновлены17 мар 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

sri1208/mental_health_classifier — англоязычная модель классификации текстов для анализа тем психического здоровья. Она создана на основе mental/mental-bert-base-uncased, предварительно обученной на публикациях Reddit о психическом здоровье, и дообучена для классификации последовательностей. Модель использует архитектуру BERT и содержит 136,7 млн параметров; максимальная длина контекста — 512 токенов.

Модель предназначена для анализа тональности, выявления признаков стресса и возможных факторов риска в публикациях, ответах на опросы и других текстах, связанных с психическим здоровьем. На вход подаётся текст, на выходе — оценки классов или вероятности. Карточка сообщает о сравнении с базовыми моделями и метриках accuracy, precision, recall, F1 и ROC-AUC, но не приводит численных результатов.

К ограничениям относятся возможная предвзятость из-за состава обучающих данных и снижение качества на текстах, отличающихся от обучающей выборки. Модель не предназначена для постановки диагноза или замены терапии и должна применяться как вспомогательный инструмент под профессиональным контролем. Лицензия в предоставленных данных не указана.

Сценарии применения

  • анализ тональности публикаций о психическом здоровье
  • выявление возможных признаков психологического дистресса в текстах
  • классификация ответов на опросы о психическом здоровье
  • мониторинг тематических публикаций в исследовательских проектах

Ограничения

Возможны смещения из-за состава обучающих данных и снижение качества на текстах, отличающихся от обучающей выборки. Модель не предназначена для диагностики и должна использоваться только как вспомогательный инструмент под надзором специалиста.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MentalBERT

Model Description

MentalBERT is a transformer-based model tailored for mental health text analysis. Built upon the BERT architecture, it has been fine-tuned on specialized mental health datasets to capture nuanced linguistic patterns that indicate various mental health states. The model aims to support research and applications in mental health assessment by offering insights into sentiment, stress, and risk factors evident in textual data.

Intended Use

  • Primary Use:
    MentalBERT is designed for mental health research and applications, such as:
    • Sentiment analysis in mental health contexts.
    • Early detection of mental health risks from text (e.g., social media posts, surveys).
    • Supporting mental health monitoring and research.
  • Target Users:
    Mental health professionals, clinical researchers, data scientists, and NLP practitioners working on mental health-related projects.
  • Out-of-Scope Use:
    This model is not intended to replace professional clinical diagnosis or therapy. It should be used as a supplementary tool and not as a definitive diagnostic instrument.

Model Architecture

  • Base Model:
    Built on the BERT architecture, leveraging its transformer layers for capturing complex language representations.
  • Custom Enhancements:
    Incorporates additional layers and attention mechanisms designed to focus on mental health-specific linguistic cues.
  • Input/Output:
    • Input: Raw text (e.g., social media posts, clinical notes, survey responses).
    • Output: Classification scores or probability distributions indicating mental health states or sentiments.
  • Key Features:
    Enhanced sensitivity to mental health lexicon and context, making it adept at detecting subtle emotional and psychological indicators.

Training Data

  • Datasets:
    Fine-tuning was performed on a collection of mental health datasets including anonymized public forum posts, social media data, and structured survey responses related to mental health.
  • Preprocessing:
    • Data anonymization to ensure privacy.
    • Standard text cleaning (e.g., removal of personally identifiable information, punctuation normalization).
    • Tokenization using BERT’s tokenizer.
  • Data Splits:
    The datasets were divided into training, validation, and test sets to rigorously evaluate model performance.
  • Data Augmentation:
    Applied techniques to address class imbalance and improve generalization where necessary.

Evaluation Metrics

  • Performance Metrics:

    • Accuracy
    • Precision, Recall, and F1-Score
    • ROC-AUC (where applicable)
  • Benchmarking:
    MentalBERT has been compared with baseline models on mental health text classification tasks, showing improved sensitivity in detecting subtle cues indicative of mental distress.

    Limitations

  • Data Bias:
    The model’s predictions are influenced by the representativeness of the training data. It may exhibit bias if the training data is not diverse.

  • Generalization:
    While effective on data similar to its training distribution, the model might underperform on texts that differ significantly in style or context.

  • Usage Caution:
    It should be used as an assistive tool and not as a sole basis for clinical decisions.

Ethical Considerations

  • Privacy:
    All training data was anonymized. Users must ensure that any input data complies with privacy regulations.
  • Responsible Use:
    The model is intended for research and supplemental use only. Clinical interpretations should always involve professional oversight.
  • Bias Mitigation:
    Continuous monitoring and re-training on diverse datasets are recommended to address potential biases.

How to Use

Below is an example code snippet to get started with MentalBERT using the Hugging Face Transformers library:

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

# Replace 'username/mentalbert' with the actual model repository path
model_name = "username/mentalbert"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)

# Example: Analyzing mental health related text
text = "I have been feeling very low and anxious recently."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)

# Convert logits to probabilities
probabilities = torch.nn.functional.softmax(outputs.logits, dim=-1)
print(probabilities)

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
26d93c1

0 моделей