Skip to main navigation Skip to search Skip to main content

Decoding HIV Discourse on Social Media: Large-Scale Analysis of 191,972 Tweets Using Machine Learning, Topic Modeling, and Temporal Analysis

  • Xiangming Zhan
  • , Meijia Song
  • , Cho Hee Shrader
  • , Chad E Forbes
  • , Angel B Algarin

    Research output: Contribution to journal › Article › peer-review

    Abstract

    Background: HIV remains a global challenge, with stigma, financial constraints, and psychosocial barriers preventing people living with HIV from accessing health care services, driving them to seek information and support on social media. Despite the growing role of digital platforms in health communication, existing research often narrowly focuses on specific HIV-related topics rather than offering a broader landscape of thematic patterns. In addition, much of the existing research lacks large-scale analysis and predominantly predates COVID-19 and the platform’s transition to X (formerly known as Twitter), limiting our understanding of the comprehensive, dynamic, and postpandemic HIV-related discourse. Objective: This study aims to (1) observe the dominant themes in current HIV-related social media discourse, (2) explore similarities and differences between theory-driven (eg, literature-informed predetermined categories) and data-driven themes (eg, unsupervised Latent Dirichlet Allocation [LDA] without previous categorization), and (3) examine how emotional responses and temporal patterns influence the dissemination of HIV-related content. Methods: We analyzed 191,972 tweets collected between June 2023 and August 2024 using an integrated analytical framework. This approach combined: (1) supervised machine learning for text classification, (2) comparative topic modeling with both theory-driven and data-driven LDA to identify thematic patterns, (3) sentiment analysis using VADER (Valence Aware Dictionary and sEntiment Reasoner) and the NRC Emotion Lexicon to examine emotional dimensions, and (4) temporal trend analysis to track engagement patterns. Results: Theory-driven themes revealed that information and education content constituted the majority of HIV-related discourse (120,985/191,972, 63.02%), followed by opinions and commentary (23,863/191,972, 12.43%), and personal experiences and stories (19,672/191,972, 10.25%). The data-driven approach identified 8 distinct themes, some of which shared similarities with aspects from the theory-driven approach, while others were unique. Temporal analysis revealed 2 different engagement patterns: official awareness campaigns like World AIDS Day generated delayed peak engagement through top-down information sharing, while community-driven events like National HIV Testing Day showed immediate user engagement through peer-to-peer interactions. Conclusions: HIV-related social media discourse on X reflects the dominance of informational content, the emergence of prevention as a distinct thematic focus, and the varying effectiveness of different timing patterns in HIV-related messaging. These findings suggest that effective HIV communication strategies can integrate medical information with community perspectives, maintain balanced content focus, and strategically time messages to maximize engagement. These insights provide valuable guidance for developing digital outreach strategies that better connect healthcare services with vulnerable populations in the post–COVID-19 pandemic era.

    Original languageEnglish (US)
    Article numbere76745
    JournalJournal of medical Internet research
    Volume27
    DOIs
    StatePublished - Aug 29 2025

    Bibliographical note

    Publisher Copyright:
    © Xiangming Zhan, Meijia Song, Cho Hee Shrader, Chad Forbes, Angel B Algarin.

    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
    2. SDG 5 - Gender Equality
      SDG 5 Gender Equality

    PubMed: MeSH publication types

    • Journal Article

    Fingerprint

    Dive into the research topics of 'Decoding HIV Discourse on Social Media: Large-Scale Analysis of 191,972 Tweets Using Machine Learning, Topic Modeling, and Temporal Analysis'. Together they form a unique fingerprint.

    Cite this