| Literature DB >> 35968436 |
Susan Cheatham1, Per E Kummervold2, Lorenza Parisi3, Barbara Lanfranchi1, Ileana Croci1, Francesca Comunello4, Maria Cristina Rota5, Antonietta Filia5, Alberto Eugenio Tozzi1, Caterina Rizzo1,6, Francesco Gesualdo1.
Abstract
Social media is increasingly being used to express opinions and attitudes toward vaccines. The vaccine stance of social media posts can be classified in almost real-time using machine learning. We describe the use of a Transformer-based machine learning model for analyzing vaccine stance of Italian tweets, and demonstrate the need to address changes over time in vaccine-related language, through periodic model retraining. Vaccine-related tweets were collected through a platform developed for the European Joint Action on Vaccination. Two datasets were collected, the first between November 2019 and June 2020, the second from April to September 2021. The tweets were manually categorized by three independent annotators. After cleaning, the total dataset consisted of 1,736 tweets with 3 categories (promotional, neutral, and discouraging). The manually classified tweets were used to train and test various machine learning models. The model that classified the data most similarly to humans was XLM-Roberta-large, a multilingual version of the Transformer-based model RoBERTa. The model hyper-parameters were tuned and then the model ran five times. The fine-tuned model with the best F-score over the validation dataset was selected. Running the selected fine-tuned model on just the first test dataset resulted in an accuracy of 72.8% (F-score 0.713). Using this model on the second test dataset resulted in a 10% drop in accuracy to 62.1% (F-score 0.617), indicating that the model recognized a difference in language between the datasets. On the combined test datasets the accuracy was 70.1% (F-score 0.689). Retraining the model using data from the first and second datasets increased the accuracy over the second test dataset to 71.3% (F-score 0.713), a 9% improvement from when using just the first dataset for training. The accuracy over the first test dataset remained the same at 72.8% (F-score 0.721). The accuracy over the combined test datasets was then 72.4% (F-score 0.720), a 2% improvement. Through fine-tuning a machine-learning model on task-specific data, the accuracy achieved in categorizing tweets was close to that expected by a single human annotator. Regular training of machine-learning models with recent data is advisable to maximize accuracy.Entities:
Keywords: Transformer model; artificial intelligence; machine learning; vaccination hesitancy; vaccines
Mesh:
Substances:
Year: 2022 PMID: 35968436 PMCID: PMC9372360 DOI: 10.3389/fpubh.2022.948880
Source DB: PubMed Journal: Front Public Health ISSN: 2296-2565
Stance categories.
|
|
|
|
|
|---|---|---|---|
| Promotional | Communicate public health benefits or safety of vaccinations, encourage vaccination, describe risks of not vaccinating or refute claims that vaccines are dangerous. Include tweets clearly criticizing anti-vax persons. | I miei figli sono vaccinati per la #varicella.C'è stata una bella epidemia e loro stanno bene, felici e senza aver preso nulla. Davide è del 2012 e abbiamo pagato il vaccino perché era a pagamento. Rinunciate a qualsiasi cosa ma #vaccinate per i vostri figli e per gli altri. | My children are vaccinated against #chickenpox. There's been an epidemic in their school and they've been fine, happy, did not have any symptom. Davide was born in 2012, we payed for the vaccine because it was not free for his age. Renounce everything but #vaccinate, for your children and for the others. |
| Neutral | Often statements, including factual recommendations about vaccines. Contain no elements of uncertainty, promotional or negative content regarding vaccines. Doubts about political decisions regarding vaccination programs may be expressed, but vaccines are referred to in a neutral way. | Coronavirus, Oms: Per vaccino dovremo attendere almeno 18 mesi | Coronavirus, WHO: For the vaccine we'll have to wait at least for 18 months. |
| Discouraging | Contain negative attitudes/arguments against vaccines. Contain questions regarding effectiveness/safety or possibility of adverse reactions that may or may not be proven. Discourage the use of recommended vaccines. | #vaccini INVALIDA per colpa di un vaccino #antinfluenzale. Il ministero della Salute condannato a risarcirla. I vaccini sono FARMACI. Diffidate da tutti quelli che vi dicono che sono sicuri e che non hanno #effetticollaterali. Indietro non si torna. | #vaccines DISABLED for a #fluvaccine. Ministry of Health condemned to pay. Vaccines are DRUGS. Be wary of all those that say that vaccines are safe and do not have #sideffects. You can't go back. |
| Ambiguous | Contain indecision or uncertainty on the risks or benefits of vaccination. | Raga io devo ancora decidere ed ho paura...se mi vaccino non so gli effetti collaterali....se non mi vaccino e mi prendo il Covid?poi x quanto sarò in pericolo?se mi vaccino x quanto funzionera'?ho paura...consigli??? | I still have to decide and I'm scared…if I get the vaccine, I don't know side effects…but what if I don't get the vaccine and I get covid? for how long will I be in danger? If I get vaccinated, how long is the vaccine going to work? I'm scared…any advice? |
Figure 1Dataset stance labels after cleaning.
Dataset after cleaning, 3 categories.
|
|
|
|
|
|
|
|
|---|---|---|---|---|---|---|
|
|
|
|
|
|
| |
| Promotional | 421 | 32.4 | 137 | 31.5 | 558 | 31.5 |
| Neutral | 382 | 29.3 | 158 | 36.3 | 540 | 30.5 |
| Discouraging | 498 | 38.3 | 140 | 32,2 | 638 | 38.0 |
| Total | 1,301 | 74.9 | 435 | 25.1 | 1,736 | 100 |
Annotator accuracy and F-scores.
|
|
|
|
|
| ||
|---|---|---|---|---|---|---|
|
|
|
|
|
|
| |
| 1 | 85.2 | 83.5 | 80.0 | 75.1 | 83.9 | 81.4 |
| 2 | 88.2 | 86.8 | 87.6 | 85.8 | 88.1 | 86.5 |
| 3 | 78.9 | 76.4 | 80.2 | 79.6 | 79.2 | 77.2 |
Data after cleaning, 3 categories (promotional, neutral, discouraging).
Accuracy and F-scores for annotators and ML models over full dataset (dataset A + B).
|
|
|
|
|---|---|---|
|
|
|
|
| Annotator 1 | 83.9 | 0.814 |
| Annotator 2 | 88.1 | 0.865 |
| Annotator 3 | 79.2 | 0.772 |
| Logistic regression + TfidfVectorizer | 63.2 | 0.625 |
| Support vector machine (LinearSVC) | 64.7 | 0.645 |
|
|
|
|
The bold values indicate annotator average (the baseline result against which ML model results are to be compared) and the XLM-RoBERTa model results.
Accuracy and F-scores by training dataset and testing dataset using the fine-tuned XLM-RoBERTa-large model.
|
|
|
|
|
|---|---|---|---|
| Dataset A | Dataset A | 72.8 | 0.713 |
| Dataset A | Dataset B | 62.1 | 0.617 |
| Dataset A | Dataset A+B | 70.1 | 0.689 |
| Dataset A+B | Dataset A | 72.8 | 0.721 |
| Dataset A+B | Dataset B | 71.3 | 0.713 |
| Dataset A+B | Dataset A+B | 72.4 | 0.720 |
Figure 2Normalized confusion matrices for the final selected fine-tuned model. Top row: XLM-Roberta-large model trained on dataset A. Bottom row: XLM-Roberta-large model trained on the combined datasets (dataset A+B). On the left, the matrices when the model is tested on dataset A. In the centre, the matrices when the model is tested on dataset B. On the right, the matrices when the model is tested on the combined datasets.