MentalBERT Based Depression Detection from Social Media: Comparing Classical, Hybrid and Transformer Models
A comparative study of classical, hybrid, and transformer models for depression-related text classification using Twitter and Reddit posts, with fine-tuned MentalBERT achieving the strongest performance among the evaluated models.
About the project
This research compares six classical machine learning, hybrid, and transformer-based models for depression-related text classification. The study uses a combined dataset of 5,164 Twitter and Reddit posts to investigate how different modelling approaches perform on this task.
The pipeline includes five stages of text preprocessing and two feature representation approaches: TF-IDF with singular value decomposition for classical models, and 768-dimensional contextual embeddings from BERT and MentalBERT for hybrid and transformer approaches. Class imbalance is addressed using SMOTE for classical models and a class-weighted loss for the fine-tuned transformer.
The evaluated approaches include Decision Tree, Logistic Regression, SVM, XGBoost, and BERT/MentalBERT-based models. The paper reports that end-to-end fine-tuned MentalBERT achieved 97.4% accuracy, a macro F1-score of 0.965, positive-class recall of 0.96, and ROC-AUC of 0.994, outperforming the evaluated baselines.
These findings describe classification performance on the study dataset and highlight the potential of domain-adapted transformers for analysing mental health-related social media text.
The paper was accepted at ICEFronT 2026 under Paper ID 792.