Detecting Mental Health Issues Through Social Media Using NLP and Machine Learning

This study proposes a new framework of AI that socially mines media for effective preemptive detection and diagnosis of mental disorders including, but not limited to, depression, anxiety, bipolar disorder, and schizophrenia. The framework utilizes natural language processing (NLP), machine learning (ML), feature learning via Convolutional Neural Networks (CNN), and classification using XGBoost. Data comprising approximately 200,000 posts was scraped from Reddit and Twitter through the Pushshift API and Tweepy,. Cleansing processes including tokenization, stop-word elimination, and vectorization through TFIDF and Word2Vec were conducted so that the data was ready for analysis. The hybrid CNN-XGBoost model yielded outstanding results achieving 92.3% accuracy for classifying depression posts, 89.7% for anxiety, 86.4% for bipolar disorder, and 81.5% for schizophrenia. These results surpass those obtained from traditional models which SVM (Support Vector Machine) and Random Forest algorithms are based on for classifying performance. Trust and ethical gaps, challenges of the frameworks had, were resolved adding Explanable Artificial Intelligence (XAI) feature integrating SHAP and LIME which greatly enhanced system trust and verifiability. The model was also enhanced by addressing the class imbalance problem with oversampling and the SMOTE technique to enhance the model. Defending dependability claims was placed of the model’s main goal, justifying for contextual underrepresentation. Examples of anticipated practical Inquiries include cross-discipline social media and mental health tracking for mental health monitoring that offers proactive engagement opportunities via early predictive algorithms. The model's proactive detection features could alleviate some operational strain placed on the infrastructure of conventional healthcare systems. Additional multilingual clinical validation research will focus on broadening the model’s exploration scope alongside enhancing its practical usability. The development of AI tools has surged, and this particular tool serves as a noteworthy early example of ethically grounded, impactful AI implementation in the realm of mental health care.

Authors

Institutions

Publication Details

Journal
International Journal for Research in Applied Science and Engineering Technology
Published
2025-04-21
DOI
https://doi.org/10.22214/ijraset.2025.69105
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

Detecting Mental Health Issues Through Social Media Using NLP and Machine Learning

Aditya Yadav
International Journal for Research in Applied Science and Engineering Technology
Mental Health via Writing
article

Detecting Mental Health Issues Through Social Media Using NLP and Machine Learning

Aditya Yadav
article en

Abstract

This study proposes a new framework of AI that socially mines media for effective preemptive detection and diagnosis of mental disorders including, but not limited to, depression, anxiety, bipolar disorder, and schizophrenia. The framework utilizes natural language processing (NLP), machine learning (ML), feature learning via Convolutional Neural Networks (CNN), and classification using XGBoost. Data comprising approximately 200,000 posts was scraped from Reddit and Twitter through the Pushshift API and Tweepy,. Cleansing processes including tokenization, stop-word elimination, and vectorization through TFIDF and Word2Vec were conducted so that the data was ready for analysis. The hybrid CNN-XGBoost model yielded outstanding results achieving 92.3% accuracy for classifying depression posts, 89.7% for anxiety, 86.4% for bipolar disorder, and 81.5% for schizophrenia. These results surpass those obtained from traditional models which SVM (Support Vector Machine) and Random Forest algorithms are based on for classifying performance. Trust and ethical gaps, challenges of the frameworks had, were resolved adding Explanable Artificial Intelligence (XAI) feature integrating SHAP and LIME which greatly enhanced system trust and verifiability. The model was also enhanced by addressing the class imbalance problem with oversampling and the SMOTE technique to enhance the model. Defending dependability claims was placed of the model’s main goal, justifying for contextual underrepresentation. Examples of anticipated practical Inquiries include cross-discipline social media and mental health tracking for mental health monitoring that offers proactive engagement opportunities via early predictive algorithms. The model's proactive detection features could alleviate some operational strain placed on the infrastructure of conventional healthcare systems. Additional multilingual clinical validation research will focus on broadening the model’s exploration scope alongside enhancing its practical usability. The development of AI tools has surged, and this particular tool serves as a noteworthy early example of ethically grounded, impactful AI implementation in the realm of mental health care.

International Journal for Research in Applied Science and Engineering TechnologyVol. 13(4)
Noida International University (IN)
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.