Covid-19 Vaccination Hesitancy: Sentiment Analysis of Twitter Posts

Dadian Qu, Yumin Chen, Taoyu Mao, Xinyu Dai2023

TL;DR

This paper applies Natural Language Processing (NLP) and machine learning to nearly 400,000 tweets to decode the underlying drivers of COVID-19 vaccine hesitancy. By combining VADER sentiment analysis with Latent Dirichlet Allocation (LDA) topic modeling, the researchers identified five core themes—Safety, Distrust, Efficacy, Complacency, and Social Distribution—finding that while safety fears dominate the conversation, those expressing general distrust may actually be the most "persuadable" group for public health outreach.

What Problem Does This Paper Address?

Public health officials face a daunting challenge: achieving herd immunity requires a high vaccination rate (estimated at 60-70%), but "vaccine hesitancy" remains a top global threat. To combat this, authorities need to understand the specific reasons why people are reluctant.

Traditional surveys are slow and often fail to capture real-time shifts in public sentiment. This paper addresses the need for "soft intelligence"—using social media as a massive, real-time focus group to categorize negative sentiments and provide actionable strategies for organizations like the CDC to refine their messaging.

Methods

The researchers developed a multi-stage pipeline to move from raw social media noise to structured insights:

  1. Preprocessing: Using the gensim library, they cleaned the data by removing URLs, hashtags, and non-ASCII characters, followed by stopword removal and stemming.
  2. Sentiment Analysis: They used VADER (Valence Aware Dictionary and sEntiment Reasoner), a tool specifically tuned for social media language, to calculate polarity scores. They filtered the dataset to keep only "negative" tweets (score < -0.05).
  3. Rigorous Filtering: To ensure high-quality topic modeling, they applied three additional filters:
  4. Subjectivity: Using Textblob to keep only tweets with a subjectivity score > 0.2 (preferring opinions over plain facts).
  5. Length: Removing tweets with fewer than 6 words.
  6. Relevance: Filtering against a custom "vaccine hesitancy word bank" of 341 terms.
  7. Topic Modeling (LDA): They used Latent Dirichlet Allocation with TF-IDF weighting.
  8. Novel Evaluation: Standard "perplexity" scores failed to show a clear optimal number of topics due to the short nature of tweets. The authors proposed a new benchmark: they manually created "gold standard" topics and tweets, then measured how well the LDA model clustered them. This led them to select 15 clusters as the optimal configuration.
  9. Human-in-the-Loop Aggregation: Using a "card sorting" method, two independent authors manually grouped the 15 clusters into 5 overarching themes based on the established 3C Model (Confidence, Complacency, and Convenience).

Datasets

The study utilized the "Covid Vaccine Tweets" dataset from Kaggle, which contains 398,592 tweets collected via the #CovidVaccine hashtag between August 2020 and August 2022. After the filtering process, the final analysis focused on a refined subset of 10,706 highly relevant, negative, and subjective tweets.

Key Insights and Ideas

  • The "Persuadability" Paradox: One of the most interesting findings came from comparing average sentiment scores across themes. While "Safety Concerns" had very negative scores, the "Distrust" theme actually had the least negative average score. The authors suggest this identifies a "priority target audience"—people who are skeptical but not yet deeply entrenched in fear, making them the most likely to be swayed by transparent communication.
  • Safety vs. Distrust: The conversation is not a monolith. Safety concerns (side effects, allergies) are the primary driver (37.4%), but distrust of government and "fast-tracked" R&D follows closely (30%).
  • The Failure of Perplexity: The paper highlights a common hurdle in NLP: standard metrics like perplexity often break down when applied to short-form text like Twitter. Their workaround—creating a manual benchmark for model evaluation—offers a practical path forward for other researchers working with micro-blogging data.

Key Results

The analysis successfully mapped the negative discourse into five distinct themes:

  • Safety Concerns (37.4%): Focused on side effects like "urticaria" or "menstrual period" changes.
  • Distrust (30.0%): Skepticism regarding the speed of vaccine development and government motives.
  • Belief Covid is Harmless (17.1%): Rooted in "complacency," particularly regarding children.
  • Efficacy (8.92%): Doubts about whether the vaccine actually prevents infection.
  • Social Distribution (6.54%): Concerns regarding racial disparities and unfair allocation.

Quantitatively, the LDA model achieved an evaluation score of 0.35 (out of a theoretical max of 0.5), which the authors deemed acceptable for such noisy, short-text data.

Limitations and Future Work

The authors acknowledge two primary limitations:

  1. Short Text Constraints: LDA is inherently designed for longer documents. Even with heavy filtering, processing 280-character tweets remains a challenge for the algorithm.
  2. Sentiment Misclassification: VADER occasionally flagged tweets as negative (due to words like "harsh" or "toxic") even when the user was describing a manageable side effect as part of a pro-vaccine narrative.

Future work suggests expanding these NLP tools to other social media platforms and using these real-time insights to help policymakers design "well-researched immunization campaigns" that specifically address the barriers identified (e.g., providing more transparent data on R&D timelines to combat the "Distrust" theme).

Summary updated

Abstract

Many people show concerns about Covid-19 vaccination and choose not to be vaccinated for different reasons. The understanding of those reasons is the key success factor in increasing the uptake rate and control the Covid-19 pandemic. To better understand the public opinions, we use Twitter posts as
BibTeX
@misc{qu2023covid,
  author = {Dadian Qu and Yumin Chen and Taoyu Mao and Xinyu Dai},
  title = {{Covid-19 Vaccination Hesitancy: Sentiment Analysis of Twitter Posts}},
  year = {2023},
  doi = {10.4108/eai.19-5-2023.2334252},
}
Figure