Loneliness Detection from Social Media: A Text Analytics Approach

Weiwei Fan, Jonathan A. Fan, Jaehoon H. Yu, Min Zhang, Qianzhou Du, Ling Tong, Weiguo FanProceedings of the ... Annual Hawaii International Conference on System Sciences/Proceedings of the Annual Hawaii International Conference on System Sciences 2025 · DOI

TL;DR

This paper introduces a novel lexicon-based approach for detecting loneliness from social media text, specifically Reddit posts. By combining frequency, similarity, and association methods, they created a robust lexicon that significantly improves AI models' ability to identify and understand expressions of loneliness, paving the way for better digital mental health interventions.

What Problem Does This Paper Address?

Loneliness is a growing global public health concern, exacerbated by increased reliance on digital interactions. While social media offers connection, it can also paradoxically amplify feelings of isolation. Accurately detecting and understanding loneliness expressed online is crucial for developing effective interventions. Existing computational methods often struggle with the nuanced and subjective nature of loneliness, relying on complex models that can be difficult to scale or interpret. This paper aims to address this gap by developing a more interpretable and scalable approach through a specialized lexicon.

Methods

The researchers employed a multi-pronged approach to build a comprehensive lexicon of loneliness indicators from Reddit.

  • Frequency-Based Method: This method utilizes TF-IDF (Term Frequency-Inverse Document Frequency) scores to identify important words and phrases. It ranks unigrams and bigrams based on their significance within individual posts relative to their frequency across the entire dataset, selecting the top 2000.
  • Similarity-Based Method: Starting with four seed words ('lonely', 'loneliness', 'isolation', 'lonesomeness'), this method uses BERT word embeddings to find words with high cosine similarity to these seeds. This captures semantically related terms even if they aren't explicitly in the seed list. The top 2000 most similar words were selected.
  • Association-Based Method: This approach uses a chi-square test to measure the statistical association between unigrams and posts classified as either loneliness-related or not. Unigrams with a significantly higher occurrence in loneliness posts were identified, with the top 2000 selected.

These three lexicons were then combined to create a unified lexicon. This unified lexicon was used to train an XGBoost model for loneliness detection. Feature importance analysis was performed on the best-performing model to identify the most impactful entries within the lexicon. Finally, a cluster analysis was conducted on the embeddings of these impactful entries to understand the different facets of loneliness they represent.

Datasets

The primary dataset used in this study was derived from the r/lonely subreddit on Reddit. The researchers crawled the top 1% by size, amassing approximately 1,000,000 posts. A random sample of 8,000 posts was then selected for binary labeling (loneliness present/absent) by four annotators.

Key Insights and Ideas

  • Lexicon Power: A carefully curated lexicon, even when derived from a single platform like Reddit, can be a powerful tool for detecting nuanced linguistic expressions of loneliness.
  • Multi-Method Synergy: Combining frequency, similarity, and association-based methods for lexicon generation yields a more comprehensive and robust set of loneliness indicators than any single method alone.
  • Impactful Subsets: Not all words in a lexicon are equally important. Identifying a smaller subset of highly impactful entries (like the 536 identified here) is crucial for building efficient and accurate models.
  • Clustering Reveals Facets: Analyzing the embeddings of key loneliness terms through clustering reveals distinct dimensions of loneliness, such as emotional/social layers, life events, intense personal struggles, and coping mechanisms. This provides a richer understanding of the phenomenon.
  • Language as a Diagnostic Tool: The study strongly suggests that linguistic markers are not just indicators but can serve as instrumental tools for psychological assessment and novel diagnostic tools.

Key Results

  • The three individual lexicons (Frequency-based, Similarity-based, Association-based) achieved peak F1 scores of 0.7514, 0.7512, and 0.7458, respectively.
  • A unified lexicon comprising 2888 unique entries was created by combining the top-performing lexicons.
  • An XGBoost model trained on this unified lexicon achieved an F1 score of 0.7538.
  • Feature importance analysis identified 536 most impactful entries from the unified lexicon.
  • When these 536 entries were used to train a new XGBoost model, the F1 score improved to 0.7781 (compared to 0.7410 with traditional features alone).
  • Further integration with article embeddings and the 536 entries yielded an F1 score of 0.7861.
  • Cluster analysis identified four distinct clusters representing different facets of loneliness.

Limitations and Future Work

  • Platform Specificity: The lexicon was derived from Reddit, which has its own unique linguistic characteristics and user base. Its direct applicability to other platforms might require adaptation.
  • Data Noise: While efforts were made to mitigate noise (e.g., bots, fake stories) through moderation, the inherent nature of social media data means some level of noise may persist.
  • Subjectivity: Loneliness is inherently subjective, and while the lexicon captures expressions, it may not fully encompass every individual's unique experience.

Future work suggested includes:

  • Developing a web-based system for real-time loneliness detection and quantification using the developed lexicon and models.
  • Exploring the dynamic nature of language and how loneliness expressions evolve over time and across different digital ecosystems and cultures.
  • Investigating the integration of these findings into AI-driven interventions for mental health support.
  • Further validating these findings in clinical and therapeutic contexts.

Summary updated

Abstract

In an era where digital interactions significantly influence our social interactions, understanding how loneliness is expressed online becomes paramount. This study delves into the linguistic representation of loneliness on Reddit, utilizing techniques in natural language processing (NLP) and machine learning. By employing frequency-based, similarity-based, and association-based methods, a unified lexicon was generated, demonstrating promising performance in classifying loneliness-related posts. The identification and validation of 536 most impactful entries from this lexicon underscore their predictive power and genuine relevance as markers of loneliness. This research advances our comprehension of loneliness within digital contexts and underscores the potential of computational methods in detecting and addressing loneliness online. The identified lexicon lays the groundwork for AI-driven mental health interventions, underscoring the significance of language in understanding and addressing loneliness in the digital age.
BibTeX
@inproceedings{fan2025loneliness,
  author = {Weiwei Fan and Jonathan A. Fan and Jaehoon H. Yu and Min Zhang and Qianzhou Du and Ling Tong and Weiguo Fan},
  title = {{Loneliness Detection from Social Media: A Text Analytics Approach}},
  booktitle = {Proceedings of the ... Annual Hawaii International Conference on System Sciences/Proceedings of the Annual Hawaii International Conference on System Sciences},
  year = {2025},
  doi = {10.24251/hicss.2025.454},
}
Figure