Social media study of public opinions on potential COVID-19 vaccines: informing dissent, disparities, and dissemination

Hanjia Lyu, Junda Wang, Wei Wu, Viet Duong, Xiyang Zhang, Timothy Dye, Jiebo Luo

TL;DR

This paper presents a large-scale social media study that uses a human-guided machine learning framework to analyze over six million tweets, tracking public sentiment toward potential COVID-19 vaccines in late 2020. The authors reveal that vaccine attitudes are deeply divided along socioeconomic and political lines, with lower-income groups exhibiting highly polarized views and political discourse serving as a massive driver of vaccine dissent.

What Problem Does This Paper Address?

As scientists raced to develop COVID-19 vaccines in 2020, public acceptance became the next critical hurdle. Traditional public health surveys are valuable but suffer from high costs, slow deployment, and social desirability bias (where respondents answer what they think interviewers want to hear).

To capture an unperturbed, real-time view of public opinion, the authors turned to social media. The challenge, however, lies in the sheer volume and noise of social media data: how do you accurately separate actual personal opinions from news sharing, filter out irrelevant vaccine discussions (like flu shots), and infer demographic attributes from anonymous or semi-anonymous users to understand why people feel the way they do?

Methods

The authors developed a human-guided machine learning framework to classify Twitter users into three categories: pro-vaccine, vaccine-hesitant, and anti-vaccine.

[Data Stream (Tweepy)] ➔ [Keyword Filter] ➔ [Active Learning Loop (XLNet)] ➔ [Feature Inference] ➔ [Regression & Counterfactuals]
  1. Active Learning Loop: To combat severe class imbalance (where most tweets were irrelevant news items), the researchers used an iterative active learning approach. They trained a four-class XLNet model ($H_1$) alongside a binary relevance filter ($H_2$). In each iteration, the model sampled the tweets most likely to be relevant, which three human experts then annotated to continuously update the training set.
  2. Feature Inference Pipeline: Because Twitter profiles lack explicit demographic fields, the authors used advanced proxy methods:
  3. Demographics: Face++ API inferred age and gender from profile images.
  4. Socioeconomic Status: An ensemble model (GBDT, Random Forest, Logistic Regression, and XGBoost) predicted income levels based on user metadata and text sentiment.
  5. Political Affiliation: Users were categorized based on whether they followed major political figures (e.g., Donald Trump vs. Joe Biden).
  6. Downstream Analysis: The final cohort of 10,945 unique users with complete feature sets was analyzed using multinomial logistic regression and counterfactual simulations via a Support Vector Machine ($H_3$).

Datasets

  • Twitter Dataset: 6,314,327 tweets (including retweets) from 1,874,468 unique users collected via the Tweepy API between September 28 and November 4, 2020. A keyword filter removed non-COVID vaccine discussions (e.g., MMR, HPV, flu shots).
  • JHU CSSE COVID-19 Data: County-level daily confirmed cases from Johns Hopkins University's repository, used to calculate the objective pandemic severity surrounding each user.

Key Insights and Ideas

  • The Nuance of Income and Polarization: Unlike prior literature suggesting higher income linearly correlates with vaccine acceptance, this study found that the lower-income group was highly polarized—significantly more likely to be either strongly pro-vaccine or strongly anti-vaccine, rather than merely hesitant.
  • Personal vs. Environmental Experience: The impact of the pandemic shapes opinions in two distinct ways. A highly negative personal pandemic experience (mined from the sentiment of their tweets) strongly predicted anti-vaccine views. Conversely, living in an area with high county-level pandemic severity predicted vaccine hesitancy.
  • The Outsized Weight of Politics: Political alignment was one of the strongest predictors of vaccine stance. Users following Donald Trump skewed heavily anti-vaccine, while those following Joe Biden skewed vaccine-hesitant rather than uniformly pro-vaccine.

Key Results

  • Opinion Distribution: Across the studied population, 57.65% of users were pro-vaccine, 19.30% were vaccine-hesitant, and 23.05% were anti-vaccine. Geographic mapping revealed lower acceptance clusters in the US Southeast and parts of the Midwest (Ohio, Indiana, Kentucky).
  • Model Performance: The active learning framework successfully boosted the XLNet model's performance over successive iterations. The final four-class model achieved an overall accuracy of 0.63 and a Cohen's Kappa of 0.50.
Model performance metrics across five active learning iterations
  • Counterfactual Impact: In simulations where the "politics" factor was completely removed (set to 0), the predicted percentage of pro-vaccine users increased by an average of 22.65%. Conversely, removing safety and effectiveness concerns reduced the pro-vaccine group by 4.42%.

Limitations and Future Work

The authors note several limitations:

  • Geographic Bias: Less populated US states were underrepresented due to data sparsity.
  • Data Augmentation: The XLNet model's accuracy (0.63) leaves room for improvement. The authors suggest using back-translation (translating text to another language and back) to artificially expand and diversify the training text in future iterations.
  • Platform Demographics: The study reflects Twitter's user base, which skews younger and more technologically literate than the general public.

Summary updated

BibTeX
@inproceedings{lyu2021social,
  author = {Hanjia Lyu and Junda Wang and Wei Wu and Viet Duong and Xiyang Zhang and Timothy Dye and Jiebo Luo},
  title = {{Social media study of public opinions on potential COVID-19 vaccines: informing dissent, disparities, and dissemination}},
  booktitle = {Intelligent},
  year = {2021},
  doi = {10.1016/j.imed.2021.08.001},
}
Figure