Depression Detection on Social Media Posts Using BERT and Support Vector Machine

Depression is a growing mental health challenge, affecting countless individuals worldwide. As people increasingly express their mental states on social media platforms like Twitter and Reddit, there is an opportunity to leverage this data to identify signs of depression. This study investigates the potential of social media text for detecting depression using machine learning techniques. We used Kaggle-sourced Twitter and Reddit datasets, each containing labeled samples of depressive and non-depressive content. After extensive preprocessing such as text cleaning, tokenization, and BERT embedding generation we trained Support Vector Machine (SVM) models with various kernel functions. Our results show Twitter data significantly enhances model performance, achieving 94.4% accuracy with the polynomial kernel while 87.5% on twitter dataset with Radial basis function (RBF). These findings underscore the potential for accurate depression detection, suggesting its value for early intervention and use of social media data for depression detection.

Authors

Institutions

Publication Details

Published
2025-03-07
DOI
https://doi.org/10.1109/csnt64827.2025.10967659
Primary Topic
Mental Health via Writing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Depression Detection on Social Media Posts Using BERT and Support Vector Machine

Rashid Ali, Mohd Adil, Haris Shoaib, Samreen Khan
Mental Health via Writing
article

Depression Detection on Social Media Posts Using BERT and Support Vector Machine

Rashid Ali, Mohd Adil, Haris Shoaib, Samreen Khan
article en

Abstract

Depression is a growing mental health challenge, affecting countless individuals worldwide. As people increasingly express their mental states on social media platforms like Twitter and Reddit, there is an opportunity to leverage this data to identify signs of depression. This study investigates the potential of social media text for detecting depression using machine learning techniques. We used Kaggle-sourced Twitter and Reddit datasets, each containing labeled samples of depressive and non-depressive content. After extensive preprocessing such as text cleaning, tokenization, and BERT embedding generation we trained Support Vector Machine (SVM) models with various kernel functions. Our results show Twitter data significantly enhances model performance, achieving 94.4% accuracy with the polynomial kernel while 87.5% on twitter dataset with Radial basis function (RBF). These findings underscore the potential for accurate depression detection, suggesting its value for early intervention and use of social media data for depression detection.

Aligarh Muslim University (IN)
Reduced inequalities
Openalex Percentile: Top 91%
Mental Health via Writing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.