Adverse effects of COVID-19 vaccination: machine learning and statistical approach to identify and classify incidences of morbidity and post-vaccination reactogenicity

Md. Martuza Ahamad, Sakifa Aktar, Md. Jamal Uddin, Md. Rashed-Al-Mahfuz, Akm Azad, Shahadat Uddin, Salem A. Alyami, Iqbal H. Sarker, Píetro Lió, Julian M.w. Quinn, Mohammad Ali MonimedRxiv 2021 · DOI

Abstract

Ensuring vaccine safety and reliability is paramount for managing infectious disease spread. While COVID-19 mRNA vaccines have demonstrated high efficacy, a small but significant number of adverse reactions have been reported. This study aims to identify common factors associated with these reactions to enable risk-reduction strategies. By analyzing patient medical histories and post-vaccination outcomes using statistical methods and machine learning (ML) classification algorithms, we identified key predictors of severe adverse events. Our analysis indicates that age, gender, allergic history, concurrent medications, type-2 diabetes, hypertension, and heart disease are significant pre-existing risk factors. Clinical predictors such as dyspnoea, cardiac arrest, and unresponsive stimuli were strongly associated with poor outcomes. ML classifiers, particularly Random Forest and XGBoost, achieved up to 89% accuracy in predicting mortality based on medical history. These findings suggest that patient profiles can be used to identify individuals requiring enhanced monitoring during vaccination.

Introduction

The global response to the COVID-19 pandemic has centered on mass vaccination. While mRNA vaccines (such as those from Pfizer-BioNTech and Moderna) have undergone rigorous clinical trials, real-world administration across diverse populations occasionally reveals rare but severe adverse reactions. These reactions range from manageable side effects to critical incidents requiring hospitalization or resulting in mortality.

The challenge for public health officials and clinicians is to distinguish between common reactogenicity and high-risk profiles. Because clinical trials may not fully represent every sub-population or rare comorbidity, analyzing real-world data from systems like the Vaccine Adverse Event Reporting System (VAERS) is essential. This research utilizes a combination of statistical analysis and machine learning to identify the pre-existing conditions and clinical symptoms that most accurately predict severe post-vaccination outcomes.

Methodology

The researchers employed a dual-layered analytical approach to ensure both statistical rigor and predictive power.

Statistical Analysis

To identify significant associations between patient features and outcomes, the study utilized:

  • Chi-square tests: Applied to categorical variables to determine if specific conditions (e.g., hypertension) were disproportionately present in patients with severe outcomes.
  • Mann-Whitney U tests: Used for continuous variables, such as age, to compare distributions between different outcome groups. A p-value threshold of < 0.05 was maintained to define statistical significance.

Machine Learning Classification

The study evaluated several supervised learning algorithms to classify patient risk:

  • Tree-based and Boosting Models: Random Forest (RF), Decision Trees (DT), Gradient Boosting Machine (GBM), XGBoost (XGB), and LightGBM (LGBM).
  • Kernel-based Models: Support Vector Machines (SVM).

To ensure the models were interpretable, the authors calculated normalized feature importance scores. This allowed for the identification of specific medical history markers and symptoms that most heavily influenced the models' predictions.

Data Source and Preparation

The study analyzed data from the US Vaccine Adverse Event Reporting System (VAERS), specifically focusing on reports from December 2020 to February 2021.

  • Dataset Composition: The final filtered dataset included 5,209 patient records associated with mRNA COVID-19 vaccines.
  • Feature Extraction: Using string matching and keyword selection, 86 attributes were extracted, including 27 pre-existing medical conditions and 56 post-vaccination symptoms.
  • Target Variables: The models were trained to predict three primary outcomes: patient death (780 cases), SARS-CoV-2 reinfection (916 cases), and hospital admission (1,712 cases).

Note: Because VAERS is a self-reporting system for adverse events, the frequency of severe outcomes in this dataset is significantly higher than in the general vaccinated population.

Key Findings and Results

Pre-existing Risk Factors

The analysis revealed that certain comorbidities significantly increase the likelihood of a severe adverse reaction. The most prominent factors included:

  • Allergic Susceptibility: A history of allergies was a top predictor across multiple models.
  • Chronic Conditions: Type-2 diabetes, hypertension, and heart disease were strongly associated with poor outcomes and longer hospital stays.
  • Medication: Patients taking other medications, particularly immunosuppressants, showed an elevated risk profile.

Clinical Predictors

When examining symptoms that occur immediately following vaccination, several "red flags" emerged as strong predictors of mortality or hospitalization:

  • Dyspnoea (shortness of breath)
  • Unresponsive stimuli
  • Cardiac arrest
  • Prolonged pyrexia (fever), fatigue, and dizziness

Model Performance

The machine learning models demonstrated high efficacy in classifying patient outcomes:

  • Mortality Prediction: Using only medical history, Random Forest and XGBoost achieved 89% accuracy, with an F1-score of 0.90 and an AUC of 0.89.
  • COVID-19 Positivity: XGBoost predicted post-vaccination SARS-CoV-2 positive status with 86% accuracy.
  • Outcome Prediction from Symptoms: When models integrated post-vaccination symptoms to predict outcomes (death, hospitalization, or COVID-19 positivity), RF, LGBM, and XGBoost maintained consistent accuracies between 84% and 87%.

Discussion and Clinical Implications

The ability to predict severe reactions with high accuracy suggests a clear path for clinical application. By integrating these predictive models into electronic health record (EHR) systems, healthcare providers could automatically flag high-risk individuals during the appointment scheduling process.

Such a system would allow for:

  1. Risk Stratification: Directing high-risk patients to clinical settings equipped with comprehensive emergency support.
  2. Enhanced Monitoring: Implementing longer post-vaccination observation periods for individuals with identified comorbidities like heart disease or severe allergies.
  3. Targeted Communication: Providing patients with specific information about "red-flag" symptoms to watch for based on their unique medical history.

Limitations and Future Work

The authors acknowledge that the dataset is relatively small (5,209 records) and geographically limited to the USA. Furthermore, the study only includes data on mRNA vaccines. To make generalized clinical recommendations, these models need to be validated on much larger, global datasets that include a wider variety of vaccine types, such as viral vector or inactivated virus vaccines.

Conclusion

This research demonstrates that machine learning and statistical approaches can effectively identify individuals at higher risk for severe adverse reactions to COVID-19 vaccines. By focusing on key comorbidities and early clinical symptoms, these models provide a data-driven framework for improving vaccine safety protocols and protecting vulnerable populations through proactive clinical monitoring.

Summary updated

Abstract

ABSTRACT Good vaccine safety and reliability are essential to prevent infectious disease spread. A small but significant number of apparent adverse reactions to the new COVID-19 vaccines have been reported. Here, we aim to identify possible common causes for such adverse reactions with a view to enabling strategies that reduce patient risk by using patient data to classify and characterise patients those at risk of such reactions. We examined patient medical histories and data documenting post-vaccination effects and outcomes. The data analyses were conducted by different statistical approaches followed by a set of machine learning classification algorithms. In most cases, similar features were significantly associated with poor patient reactions. These included patient prior illnesses, admission to hospitals and SARS-CoV-2 reinfection. The analyses indicated that patient age, gender, allergic history, taking other medications, type-2 diabetes, hypertension and heart disease are the most significant pre-existing factors associated with risk of poor outcome and long duration of hospital treatments, pyrexia, headache, dyspnoea, chills, fatigue, various kind of pain and dizziness are the most significant clinical predictors. The machine learning classifiers using medical history were also able to predict patients most likely to have complication-free vaccination with an accuracy score above 85%. Our study identifies profiles of individuals that may need extra monitoring and care (e.g., vaccination at a location with access to comprehensive clinical support) to reduce negative outcomes through classification approaches. Important classifiers achieving these reactions notably included allergic susceptibility and incidence of heart disease or type-2 diabetes.
BibTeX
@misc{ahamad2021adverse,
  author = {Md. Martuza Ahamad and Sakifa Aktar and Md. Jamal Uddin and Md. Rashed-Al-Mahfuz and AKM Azad and Shahadat Uddin and Salem A. Alyami and Iqbal H. Sarker and Píetro Lió and Julian M.W. Quinn and Mohammad Ali Moni},
  title = {{Adverse effects of COVID-19 vaccination: machine learning and statistical approach to identify and classify incidences of morbidity and post-vaccination reactogenicity}},
  year = {2021},
  doi = {10.1101/2021.04.16.21255618},
  howpublished = {medRxiv},
}
Figure