Identifying Insomnia From Social Media Posts: Psycholinguistic Analyses of User Tweets

Ahmed Shahriar Sakib, Md. Saddam Hossain Mukta, Fariha Rowshan Huda, A.k.m. Najmul Islam, Tohedul Islam, Mohammed Eunus AliJournal of Medical Internet Research 2021 · DOI

TL;DR

Researchers have developed a machine learning ensemble model that can identify insomnia in Twitter users with nearly 79% accuracy. By analyzing subtle psycholinguistic cues—such as increased use of swear words and anxiety-related language—and correlating them with Big 5 personality traits like high neuroticism, the system offers a potential path for early, non-invasive screening of sleep disorders.

What Problem Does This Paper Address?

Insomnia affects roughly 30% of adults worldwide, often leading to secondary issues like depression, anxiety, and decreased quality of life. While clinical diagnosis is the gold standard, many sufferers remain undiagnosed or only seek help once symptoms become severe.

Social media has become a "digital exhaust" of our mental states. While previous research attempted to identify insomnia by searching for explicit keywords (like "sleepless" or "insomnia"), these methods are easily "gamed" and fail to capture users who haven't yet labeled their own condition. This paper addresses the gap by looking for the latent signals of insomnia: the specific ways people change their word choices, emotional expression, and social interactions when they aren't sleeping well.

Methods

The authors built a double-weighted ensemble classification model that integrates three distinct analytical perspectives:

  1. Psycholinguistic Analysis: Using tools like LIWC (Linguistic Inquiry and Word Count) and Empath, the researchers categorized words into functional groups (e.g., swear words, negative emotions, "social" words).
  2. Semantic Word Embeddings: They employed BERT (Bidirectional Encoder Representations from Transformers) to understand the context and relationships between words, feeding these into a Convolutional Neural Network (CNN).
  3. Personality Profiling: Using the IBM Watson Personality Insight API, they derived Big 5 personality traits (Openness, Conscientiousness, Extraversion, Agreeableness, and Neuroticism) from the users' tweet history.

The "double-weighted" aspect refers to how the model prioritizes these three components based on their performance across both training and testing phases, ensuring the most reliable features have the most influence on the final prediction.

Datasets

The study utilized a custom-built dataset of 4,198,683 tweets from 1,574 users across six English-speaking countries (USA, UK, Canada, Australia, Ireland, and New Zealand).

  • Labeling: Users were manually labeled "Insomnia Yes" or "No" based on initial searches for sleep-related phrases.
  • Bias Removal: Crucially, after labeling, the researchers removed explicit words like "insomnia" and "sleepless" from the dataset. This forced the model to learn from the style and sentiment of the writing rather than just keyword matching.

Key Insights and Ideas

  • The "Ill-Tempered" Sleeper: The data confirmed that insomniacs use significantly more negative words ("no," "never"), swear words ("damn," "fuck"), and anxious language ("worried," "nervous").
  • Personality Links: High Neuroticism and Conscientiousness were strong predictors of insomnia. While neuroticism (emotional instability) is a known correlate, the link to high conscientiousness suggests that "meticulous" or "achievement-oriented" individuals may be more prone to sleep-disrupting stress.
  • Social Seeking: Surprisingly, insomniacs wrote more "social words." The authors suggest that when people can't sleep, they may turn to social media to socialize with others to pass the time or seek comfort.
  • The Pregnancy Connection: Using Topic Modeling (LDA), the researchers found that a specific subset of female users suffered from pregnancy- or postpartum-induced insomnia, identifying "weird," "tired," and "child" as major recurring themes.

Key Results

  • Strong Predictive Power: The final ensemble model achieved an AUC (Area Under the Curve) of 78.8% on the training set and 76.91% on the test set.
  • Individual Performance: Among standalone classifiers, the Gaussian Process model performed best (AUC 75.3%).
  • Linguistic Shifts: Insomniacs used anxiety-related words 10% more frequently than the control group.

Limitations and Future Work

The authors acknowledge several limitations:

  • Disclosure Bias: The study only included users who explicitly mentioned their insomnia at some point to allow for labeling; it may miss those who suffer in total silence.
  • Language & Culture: The study was limited to English-speaking users in Western countries. Linguistic markers of distress can vary significantly across cultures and languages.
  • Future Directions: The researchers plan to integrate more diverse data points, such as friend lists, the specific timestamps of tweets (to measure nighttime activity more precisely), and expanding the analysis to multiple languages. They envision this being used in software to help doctors flag "at-risk" patients earlier in the diagnostic process.

Summary updated

Abstract

Our model can help predict insomnia from users' social media interactions. Thus, incorporating our model into a software system can help family members detect insomnia problems in individuals before they become worse. The software system can also help doctors to diagnose possible insomnia in patients.
BibTeX
@article{sakib2021identifying,
  author = {Ahmed Shahriar Sakib and Md. Saddam Hossain Mukta and Fariha Rowshan Huda and A.K.M. Najmul Islam and Tohedul Islam and Mohammed Eunus Ali},
  title = {{Identifying Insomnia From Social Media Posts: Psycholinguistic Analyses of User Tweets}},
  journal = {Journal of Medical Internet Research},
  year = {2021},
  doi = {10.2196/27613},
}
Figure