Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Sep 4:11:e58259.
doi: 10.2196/58259.

Natural Language Processing for Depression Prediction on Sina Weibo: Method Study and Analysis

Affiliations

Natural Language Processing for Depression Prediction on Sina Weibo: Method Study and Analysis

Zhenwen Zhang et al. JMIR Ment Health. .

Abstract

Background: Depression represents a pressing global public health concern, impacting the physical and mental well-being of hundreds of millions worldwide. Notwithstanding advances in clinical practice, an alarming number of individuals at risk for depression continue to face significant barriers to timely diagnosis and effective treatment, thereby exacerbating a burgeoning social health crisis.

Objective: This study seeks to develop a novel online depression risk detection method using natural language processing technology to identify individuals at risk of depression on the Chinese social media platform Sina Weibo.

Methods: First, we collected approximately 527,333 posts publicly shared over 1 year from 1600 individuals with depression and 1600 individuals without depression on the Sina Weibo platform. We then developed a hierarchical transformer network for learning user-level semantic representations, which consists of 3 primary components: a word-level encoder, a post-level encoder, and a semantic aggregation encoder. The word-level encoder learns semantic embeddings from individual posts, while the post-level encoder explores features in user post sequences. The semantic aggregation encoder aggregates post sequence semantics to generate a user-level semantic representation that can be classified as depressed or nondepressed. Next, a classifier is employed to predict the risk of depression. Finally, we conducted statistical and linguistic analyses of the post content from individuals with and without depression using the Chinese Linguistic Inquiry and Word Count.

Results: We divided the original data set into training, validation, and test sets. The training set consisted of 1000 individuals with depression and 1000 individuals without depression. Similarly, each validation and test set comprised 600 users, with 300 individuals from both cohorts (depression and nondepression). Our method achieved an accuracy of 84.62%, precision of 84.43%, recall of 84.50%, and F1-score of 84.32% on the test set without employing sampling techniques. However, by applying our proposed retrieval-based sampling strategy, we observed significant improvements in performance: an accuracy of 95.46%, precision of 95.30%, recall of 95.70%, and F1-score of 95.43%. These outstanding results clearly demonstrate the effectiveness and superiority of our proposed depression risk detection model and retrieval-based sampling technique. This breakthrough provides new insights for large-scale depression detection through social media. Through language behavior analysis, we discovered that individuals with depression are more likely to use negation words (the value of "swear" is 0.001253). This may indicate the presence of negative emotions, rejection, doubt, disagreement, or aversion in individuals with depression. Additionally, our analysis revealed that individuals with depression tend to use negative emotional vocabulary in their expressions ("NegEmo": 0.022306; "Anx": 0.003829; "Anger": 0.004327; "Sad": 0.005740), which may reflect their internal negative emotions and psychological state. This frequent use of negative vocabulary could be a way for individuals with depression to express negative feelings toward life, themselves, or their surrounding environment.

Conclusions: The research results indicate the feasibility and effectiveness of using deep learning methods to detect the risk of depression. These findings provide insights into the potential for large-scale, automated, and noninvasive prediction of depression among online social media users.

Keywords: Sina Weibo; deep learning; depression; linguistic analysis; mental health; mood analysis; natural language processing; risk prediction; social media; statistical analysis.

PubMed Disclaimer

Conflict of interest statement

Conflicts of Interest: None declared.

Figures

Figure 1.
Figure 1.. The workflow for data set construction and model learning. Eval set: evaluation set; Train set: training set.
Figure 2.
Figure 2.. The architecture of our proposed depression prediction model. FFN: feedforward neural network; LSTM-Attention: long short-term memory with attention.
Figure 3.
Figure 3.. Performance comparison between applying retrieval-based sampling strategy and not applying any sampling strategy. BERT: bidirectional encoder representation from transformer; BiGRU: bidirectional gated recurrent unit; BiGRU-attention: bidirectional gated recurrent unit with attention; BiLSTM: bidirectional long short-term memory; BiLSTM-attention: bidirectional long short-term memory with attention; CNN: convolutional neural network; GRU: gated recurrent unit; GRU-Attention: gated recurrent unit with attention; HCN: hierarchical convolutional network; HTN: hierarchical transformer network; LSTM: long short-term memory; LSTM-Attention: long short-term memory with attention.
Figure 4.
Figure 4.. Comparison of model performance results with different sampling strategies and sampling ratios. BERT: bidirectional encoder representation from transformer; BiGRU: bidirectional gated recurrent unit; BiGRU-attention: bidirectional gated recurrent unit with attention; BiLSTM: bidirectional long short-term memory; BiLSTM-attention: bidirectional long short-term memory with attention; CNN: convolutional neural network; GRU: gated recurrent unit; GRU-Attention: gated recurrent unit with attention; HCN: hierarchical convolutional network; HTN: hierarchical transformer network; LSTM: long short-term memory; LSTM-Attention: long short-term memory with attention.
Figure 5.
Figure 5.. Comparison of the social behaviors between depressed and nondepressed users. “Word/Post”: the average number of words per post; “Post/User”: the average number of posts per user; “Post/User/Week”: the average number of posts per user per week; “1stPerSing/Post”: the frequency of the first-person singular (我) used per post; “1stPerPlural/Post”: the frequency of the first-person singular (我们) used per post; “depression/Post”: the frequency of the keywords (抑郁症, 抑郁) used per post; “Drugs/Post”: the frequency of mentioning depression medication–related terms per post.
Figure 6.
Figure 6.. Comparison of the modal particle use between depressed and nondepressed users.
Figure 7.
Figure 7.. Comparison of the punctuation use between depressed and nondepressed users.
Figure 8.
Figure 8.. Comparison of significant Linguistic Inquiry and Word Count features between depressed and nondepressed users.

Similar articles

Cited by

References

    1. Evans-Lacko S, Aguilar-Gaxiola S, Al-Hamzawi A, et al. Socio-economic variations in the mental health treatment gap for people with anxiety, mood, and substance use disorders: results from the WHO World Mental Health (WMH) surveys. Psychol Med. 2018 Jul;48(9):1560–1571. doi: 10.1017/S0033291717003336. doi. Medline. - DOI - PMC - PubMed
    1. Fox AB, Smith BN, Vogt D. How and when does mental illness stigma impact treatment seeking? longitudinal examination of relationships between anticipated and internalized stigma, symptom severity, and mental health service use. Psychiatry Res. 2018 Oct;268:15–20. doi: 10.1016/j.psychres.2018.06.036. doi. Medline. - DOI - PubMed
    1. Cosco TD, Lachance CC, Blodgett JM, et al. Latent structure of the Centre for Epidemiologic Studies Depression Scale (CES-D) in older adult populations: a systematic review. Aging Ment Health. 2020 May;24(5):700–704. doi: 10.1080/13607863.2019.1566434. doi. Medline. - DOI - PubMed
    1. Richter P, Werner J, Heerlein A, Kraus A, Sauer H. On the validity of the Beck Depression Inventory. Psychopathology. 1998 Feb;31(3):160–168. doi: 10.1159/000066239. doi. Medline. - DOI - PubMed
    1. Kroenke K, Spitzer RL, Williams JB. The PHQ-9: validity of a brief depression severity measure. J Gen Intern Med. 2001 Sep;16(9):606–613. doi: 10.1046/j.1525-1497.2001.016009606.x. doi. Medline. - DOI - PMC - PubMed

LinkOut - more resources