Source-linked AI summary

Machine Learning-based Approach for Depression Detection in Twitter Using Content and Activity Features

Hatoon S. AlSagri, Mourad Ykhlef

arXiv:2003.04763v1cs.SIcs.LGstat.ML

TL;DR

Depression can remain unrecognized or untreated, motivating methods that might identify it from social-media data. This study trains classifiers on Twitter users’ tweets and activity features; richer features improved reported results, with SVM-L reaching 82% accuracy and an F measure of 0.79.

  • Problem

    Depression can remain undiagnosed or untreated because of unrecognition or denial, motivating examination of social-media data for depression detection.

    Source: Introduction · p. 1
  • Method

    The study trains machine-learning classifiers using features from users’ tweets and Twitter account activity.

    Source: Introduction · p. 2, §4.3 · pp. 13–14
  • Results

    Richer feature sets improved stability and the precision–recall trade-off; SVM-L reached 82% accuracy and 0.79 F measure, while NB reached 80% accuracy.

    Source: §4.3 · p. 13
  • Takeaways & Limitations

    Tweet and account-history features enable models to monitor changes in users’ mental and psychological states.

    Source: §4.3 · p. 14

    The authors call for models less likely to overfit the data and a more dependable way to measure feature impact.

    Source: §5 · p. 15

Abstract

from arXiv · show

Social media channels, such as Facebook, Twitter, and Instagram, have altered our world forever. People are now increasingly connected than ever and reveal a sort of digital persona. Although social media certainly has several remarkable features, the demerits are undeniable as well. Recent studies have indicated a correlation between high usage of social media sites and increased depression. The present study aims to exploit machine learning techniques for detecting a probable depressed Twitter user based on both, his/her network behavior and tweets. For this purpose, we trained and tested classifiers to distinguish whether a user is depressed or not using features extracted from his/ her activities in the network and tweets. The results showed that the more features are used, the higher are the accuracy and F-measure scores in detecting depressed users. This method is a data-driven, predictive approach for early detection of depression or other mental illnesses. This study's main contribution is the exploration part of the features and its impact on detecting the depression level.

Introduction

The introduction frames depression as a serious, often unrecognized illness and motivates using social-media data for earlier detection. The study examines whether Twitter users’ tweets and network activity can help identify depression.

Introduction

  • Depression is a common mental illness and a leading cause of disability worldwide, and it may cause suicide.The introduction notes that many patients do not consult doctors at early stages and may reach more advanced stages before seeking care [1].Source: Introduction · p. 1
  • The authors present social-media data as an opportunity to augment information available to mental-health clinicians and researchers [3].They also describe early recognition and timely treatment as ways the onset of major depression can be prevented [7].Source: Introduction · p. 1
  • The study aims to classify whether Twitter users are depressed using both their tweets and network activity.It uses data from 111 user profiles and more than 300,000 tweets; SVM-linear achieved 82.5 accuracy and an F-measure of 0.79.Source: Introduction · p. 2

1. Literature Review

Prior Twitter-depression studies have used tweet content, user activity, and combinations of linguistic, behavioral, and sentiment features. Their reported classifiers and performance vary across datasets and study designs.

1. Literature Review

  • De Choudhury et al. [8] used behavioral attributes and an SVM on more than 2 million tweets from 476 clinically diagnosed users, reporting 70% classification accuracy.Tsugawa et al. [13] used word frequencies and topic modeling, reporting 69% accuracy among 81 questionnaire participants.Source: §1 · p. 2
  • Reece et al. [9] used affect, linguistic style, and context features, with a 1,200-tree random forest reaching precision of 0.866.Their depression labels relied on CESD scores for 105 of 204 depressed users.Source: §1 · p. 2
  • Nadeem et al. [10] applied bag-of-words features and reported that Naive Bayes achieved 81% accuracy and 0.86 precision.Their corpus included more than 2.5 million tweets from users who indicated depression or PTSD.Source: §1 · p. 2
  • Jamil et al. [14] trained an SVM on 95 users who disclosed depression (5% of participants; remaining 95% healthy), achieving recall 0.875 and precision 0.775.De Choudhury et al. [8] built a depression lexicon; Jamil et al. [17] used depressed-tweet percentage and self-indication to remove users from training, increasing model accuracy.Source: §1 · p. 3

2. Background

The background introduces Naive Bayes, decision trees, and support vector machines as classifiers used in the study. It outlines their basic mechanisms and notes limitations of SVM and conditions for using Naive Bayes.

2.1 Classifiers

  • Naive Bayes is based on Bayes’ theorem and can be applied only when features are independent of one another [18].It estimates posterior possibilities for classes from the possible circumstances of each feature and can combine evidence from several features.Source: §2.1 · p. 3
  • Decision trees partition data through feature-based splits, evaluated using entropy [21].Each node represents a feature and each division a possible value; trees can structure nonlinear boundaries and are described as interpretable [17, 22].Source: §2.1 · pp. 3–4
  • SVM is a supervised classifier that separates labeled classes with a hyperplane, maximizing the distance to the nearest training examples [26].It can use a kernel to represent inner products in an expanded feature space; the radial basis function is given as a common example.Source: §2.1 · p. 5
  • SVM can tolerate outliers but is computationally inefficient and sensitive to kernel hyperparameters.Source: §2.1 · p. 5

3 Methodology

The method detects depressed versus non-depressed Twitter accounts by combining tweet-content features with account-activity measures and classifying the merged features with decision trees, linear and radial SVMs, or Naive Bayes.

3 Methodology

  • The pipeline combines account tweets and activity data, preprocesses text into account-level document-term features, merges these with activity measures, and trains DT, linear/radial SVM, and NB classifiers.Classifiers use 10-fold cross-validation and are then tested on a held-out set.Source: §3 · pp. 5–6

3.1 Feature Engineering

  • Feature engineering extracts text features after preprocessing and combines them with network-activity measures for classification.Table 1 lists the features and possible values; its T/F values indicate whether a feature is used, including TF-IDF versus word frequency.Source: §3.1 · pp. 6–7, §3 · p. 6
  • The text pipeline retains first-person pronouns, uses TF-IDF to weight words, removes terms with more than 95% zeros, and compares Most-frequent with Information gain feature selection.Information gain measures information bits for category prediction from a term’s presence or absence.Source: §3.1 · p. 8
  • Tweet sentiment is represented by the account-wide average sentiment and a Mixed feature for positive or negative sentences with hidden negative indication.Source: §3.1 · p. 8
  • Dept_Sent uses positive and negative sentiment words extracted from depressed users’ tweets, removes other words, and avoids relying on a static depression lexicon.The authors describe it as generalizable and easily extendable.Source: §3.1 · p. 8
  • Account activity features include measures such as retweets and mentions, represented as-is, normalized by post count, or categorized into four activity levels.Categorical cutoffs are based on quartile values Q1, Q2, and Q3.Source: §3.1 · pp. 8–9
  • The Synonyms feature uses WordNet to combine frequencies of similar words, strengthening their representation while reducing corpus vocabulary size and computation time.Source: §3.1 · p. 9

4. Experiment and Results

The experiments compare depressed/not-depressed classifiers using Twitter users’ tweets and activity features across feature variants and algorithms. The authors report that richer discriminant features improve results and that their model outperforms previous models in accuracy.

4.1 Data Collection

  • Depressed users’ tweets were self-reported, manually reviewed, and collected up to 3,000 per user; non-depressed accounts were randomly collected and manually checked.Users with fewer than five posts were excluded.Source: §4.1 · p. 10

4.2 Evaluation Measures

  • Evaluation uses accuracy, precision, recall, F1, confusion matrices, and ROC assessment to examine classifier performance and the precision–recall trade-off.Precision concerns correctly identified users among those predicted depressed; recall concerns detected users among all depressed users.Source: §4.2 · pp. 10–11

4.3 Results

  • With mixed sentiment and as-is account measures, F1 is 0.784 for NB and 0.68 for both DT and SVM-L.This configuration grants higher F1 across the exploited algorithms.Source: Figure 6 · p. 11, §4.3 · p. 11
  • InfoGain provides higher F-measure results than MostFreq for all classification models.The passage refers to Table 1 for these results.Source: §4.3 · p. 11
  • With Dept-Sent, SVM-L F-measure rises from 0.57 to 0.65; DT recall rises from 0.56 to 0.69 despite a decrease in its F-measure.Accuracy and F-measure increase for all classifiers except DT; NB and SVM-R show slight F-measure increases.Source: §4.3 · p. 12, Table 3 · p. 12
  • Adding the Categoral feature increases F-measure for all classifiers except SVM-L, which shows no change but a slight recall increase.The authors describe Categoral as a newly derived feature not previously considered.Source: §4.3 · p. 12, Table 4 · p. 12
  • With synonyms applied to training and testing sets, SVM-L reaches 82% accuracy and 0.79 F-measure, while NB reaches 80% accuracy; F-measure increases for models except SVM-R.Source: §4.3 · p. 13
  • The proposed model outperforms previously proposed models in accuracy, which the authors attribute to its richer, more diverse feature set.The comparison is presented in Table 6.Source: Table 6 · p. 14, §4.3 · p. 14

5. Conclusion

The study frames depression detection as binary classification using both tweet content and Twitter profile activity, emphasizing a rich, diverse feature set. It reports optimal accuracy-metric combinations for SVM and identifies further model and feature-impact work.

5. Conclusion

  • The study’s main contribution is a rich, diverse, discriminating feature set combining tweet text with users’ behavioral trends.Source: §5 · p. 14
  • SVM achieves optimal accuracy-metric combinations and converts the nonlinear classification problem into a linearly separable one.Source: §5 · p. 14
  • Decision Tree is interpretable but can fail on brand-new data; future work includes less-overfit-prone models and more dependable measurement of feature impact.Source: §5 · pp. 14–15
Loading 2003.04763v1…