Skip to main navigation Skip to search Skip to main content

Detecting Mental Health Conditions from Reddit Posts using Machine Learning

  • Mujeeb Ur Rehman
  • , Sohail Khalid
  • , M. Adel R. Alkhulaiteet
  • , Menahil Khawar
  • , Farhan Ullah
  • , Imran Baig

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

Social media platforms such as Reddit host a large volume of user-generated content that can reveal indicators of mental health conditions. This study presents a machine learning framework for the multi-class detection of mental health states, including Normal, Depression, Suicidal, Anxiety, Bipolar, Stress, and Personality Disorder, from Reddit posts. A dataset of relevant subreddits was collected and labeled in these seven categories. The text was cleaned, and features were extracted using TFIDF, LDA topics, sentiment scores, and basic linguistic cues. Multiple classifiers were trained, including logistic regression, linear SVM, random forest, Light Gradient Boosting Machine, and XGBoost, with SMOTE oversampling applied to address class imbalance. A stacked ensemble model combining the base classifier outputs achieved the best performance with an accuracy of 91%, macro-F1 of 0.92, and AUC of 0.93. These results show that interpretable, relatively lightweight machine learning models can accurately classify a range of mental health states from social media texts, supporting the development of scalable tools for the early detection and intervention of mental health issues.
Original languageEnglish
Title of host publication 2025 International Conference on Computational Intelligence, Security, and Artificial Intelligence (IntelliSecAI)
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages1-6
Number of pages6
ISBN (Electronic)9798331565763
ISBN (Print)9798331565770
DOIs
Publication statusPublished - 15 Apr 2026
Event2025 International Conference on Computational Intelligence, Security, and Artificial Intelligence (IntelliSecAI) - Al-Khobar, Saudi Arabia
Duration: 17 Dec 202518 Dec 2025

Conference

Conference2025 International Conference on Computational Intelligence, Security, and Artificial Intelligence (IntelliSecAI)
Country/TerritorySaudi Arabia
CityAl-Khobar
Period17/12/2518/12/25

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 3 - Good Health and Well-being
    SDG 3 Good Health and Well-being

Cite this