Mathematical Modeling and Machine Learning: COVID-19 Insights
Written on
Chapter 1: Understanding the Impact of COVID-19
As the COVID-19 pandemic began in early 2020, a multitude of researchers leveraged their modeling skills to project the virus's trajectory and identify effective interventions. Below is a comprehensive overview of the methodologies employed.
The predominant mathematical frameworks stem from the SIR and SEIR models, primarily utilized for forecasting population-level outcomes (e.g., timing of peak infections and hospitalization rates) and guiding intervention strategies (e.g., lockdowns, quarantines, social distancing, and mask mandates).
In contrast, most Machine Learning (ML) models are based on Convolutional Neural Networks (CNNs), which tackle various challenges, including diagnosing infections through CT scans, tracking the virus's spread via mobile data, developing vaccine molecules, and creating AI systems for hospital sanitation.
For further reference, check out the classification of model approaches detailed in my previous article. If you are new to AI and ML, my explanatory article can provide a helpful introduction.
New to AI and ML? Check out my explainer article.
Mathematical Models for COVID-19
Let’s examine two key epidemiological models—the logistic and SIR models—and their adaptations for COVID-19.
Logistic Model
This model begins with two compartments, S (susceptible) and I (infected), representing the transition of disease from a vulnerable population to one that is infected, governed by a transmission rate β. This parameter β is adjusted based on how frequently susceptible and infected individuals come into contact and the contagious nature of the disease.
The dynamics can be expressed through an ordinary differential equation (ODE). In essence, the infection growth rate (dI/dt) is influenced by the product of the susceptible and infected populations (S × I) and the ease of transmission (β). By presuming a constant total population (S + I = N), we can simplify the ODE.
The logistic differential equation is widely recognized in scientific fields and is considered a versatile model applicable in scenarios involving limited resources. In this context, the virus competes for uninfected individuals, a finite resource. The total population, N, is termed the carrying capacity, representing a stable equilibrium. Irrespective of the initial infection levels, the outcome is that eventually, everyone becomes infected. In this scenario, the virus is the victor.
An illustration of resource-limited growth can also be seen in human competition for Earth's resources, estimated to sustain around 9–10 billion individuals. This denotes the maximum sustainable long-term population, given our planet's finite food and resource availability.
We can solve the ODE numerically or analytically to determine I(t) and visualize these solution curves. The solutions I(t) reflect the total case counts on any given day, known as cumulative prevalence. Two solutions are plotted here, one representing a rapid outbreak (β = 0.15) and another a slower one (β = 0.07).
Additionally, public health officials often require projections of daily case increases, generated from epidemic curves. These curves result from differentiating I(t), indicating daily changes in infections.
Higher epidemic curves signify increased pressure on healthcare systems, as the number of infected individuals competes for limited hospital resources.
To conclude, here's a brief outline of the steps for analytically solving the logistic ODE. We start with the logistic model, utilize algebraic methods (separation of variables) to reverse the derivative, yielding the general solution—a collection of curves, each corresponding to different initial infection levels I(0). This solution can be rearranged to express I as a function of t, facilitating plotting with various tools.
A comparison of solution curves based on initial conditions I(0) = 1%, 10%, and 50% illustrates this concept.
It is important to note that many differential equations are not amenable to analytical solutions. Numerical solvers are often the only practical approach, as exemplified by the Navier-Stokes equations, which require supercomputers for daily weather forecasting.
However, techniques like equilibria/stability analysis and bifurcation theory offer robust tools for studying ODEs without needing to solve them analytically. Some analyses can even be done manually. I plan to delve deeper into this topic in a future article.
SIR Model
The traditional three-compartment SIR model, developed by Kermack and McKendrick in the 1920s, has served as the foundational model in epidemiology. Similar to the logistic model, this model includes compartments for susceptible and infected individuals, plus a recovery compartment, forming a system of three ODEs.
In this model, the infected population I spreads the disease to the susceptible group S at a transmission rate β, mirroring the logistic model's mechanics. Additionally, we assume that the infected population recovers at a rate γ, enhancing the logistic model's framework.
Numerically solving these ODEs allows us to visualize the results, as shown in the plots created with Python and enhanced in Illustrator.
Herd Immunity
The infection peaks around the 68-day mark, coinciding with the Herd Immunity Threshold, where the competition between the virus and potential victims becomes intense as many individuals recover and gain immunity. Consequently, the infected curve begins to decline, providing relief to public health officials.
Initially, some governments considered pursuing herd immunity by allowing the virus to circulate freely, aiming to quickly build resistance within the population to curb viral spread. However, this strategy was largely abandoned due to the significant mortality risk involved and the uncertainty regarding the duration of immunity against SARS-CoV-2, which turned out to be limited.
Basic Reproductive Number and Flattening the Curve
A crucial metric during the pandemic has been the Basic Reproductive Number, R0, indicating the average number of individuals each infected person transmits the virus to.
When R0 exceeds 1, the disease continues to propagate. Efforts to suppress R0 below 1 signify progress towards controlling the outbreak. Interventions such as social distancing, lockdowns, and mask-wearing are pivotal in achieving this goal.
In the SIR model, the basic reproduction number is defined as R0 = β/γ. For instance, if the transmission rate β is 0.2 and the recovery rate γ is 0.1, the number of infections grows at twice the rate of recoveries, yielding R0 = 2. This means that on average, each infected person infects two others.
In the early stages of the outbreak, the goal was not to reduce R0 below 1 immediately but rather to suppress it enough to prevent overwhelming healthcare systems. This objective is referred to as "flattening the curve."
The SIR model simulations illustrate infection numbers for R0 values of 2, 3, and 4, along with the corresponding curves.
Health systems globally can only accommodate a limited number of COVID-19 patients before reaching capacity constraints regarding ICU beds, ventilators, and medical staff.
During the pandemic's onset, public health agencies established these healthcare capacity thresholds. Modelers rapidly provided insights into the necessary interventions to keep the infection curve below critical levels.
Some regions successfully flattened their infection curves, with Australia, China, Taiwan, and South Korea serving as notable examples.
The first video titled Epidemic Model Guided Machine Learning for COVID-19 Forecasts delves into how epidemic models inform machine learning strategies for predicting COVID-19 trends.
SEIR Model and Beyond
The SEIR model expands on the SIR framework by incorporating incubation periods. In this model, a susceptible individual becomes exposed after contact with the virus but remains non-infectious during the incubation phase, which typically lasts between 3 to 14 days, with a median of about 5 days.
Further adaptations of the SEIR model for COVID-19 may introduce elements like quarantine and immunity loss, leading to models such as SEIQRS.
The modeling possibilities are vast; researchers can include migration factors, differentiate between symptomatic and asymptomatic populations, and integrate long-term immunity through vaccination strategies.
However, it's crucial to recognize that increased complexity does not always equate to improved modeling accuracy. A balance exists between model realism and interpretability. More intricate models often face computational challenges as well.
Despite the multitude of factors influencing COVID-19 transmission, most are likely extraneous noise that need not be accounted for in primary models. The fundamental SIR and SEIR models continue to yield effective results even a century later.
In my previous article, Differential Equations Versus Machine Learning, I elaborate on model complexity and its implications.
Chapter 2: Machine Learning for COVID-19
In the realm of machine learning, algorithms are trained to understand the underlying principles of a system by analyzing high-quality data. This contrasts with mechanistic modeling, such as differential equations, where the rules are predefined.
The majority of ML applications in COVID-19 have centered around Convolutional Neural Networks (CNNs), particularly in medical imaging.
#### Diagnostic Medical Imaging
AI has played a significant role in the medical imaging sector, utilizing various ML techniques on X-ray and CT scans for diagnostic purposes. Below are several studies categorized by algorithm.
X-ray scans are employed to detect lung infections, while CT scans provide a detailed view of the body, revealing excess fluid in the lungs—one of the severe symptoms of COVID-19, which can lead to mechanical ventilation.
Ventilators are crucial medical devices, but their limited availability, along with the need for specialized ICU nursing staff, has prompted governments worldwide to take urgent measures to "flatten" their respective infection curves. This is essential to avoid difficult decisions regarding patient care.
Convolutional Neural Networks (CNN): These networks utilize a series of nodes that emulate brain neurons. When multiple layers are employed, they are referred to as Deep Learning algorithms. CNNs specifically analyze images, assigning weights to features to distinguish different images.
- Identification of key factors in COVID-19 cases using chest X-rays from 13,725 subjects.
- Detection of COVID-19 in X-rays using ResNet50, InceptionV3, and InceptionResNetV2 architectures.
- Extraction of visual features from chest CT images associated with COVID-19 pneumonia.
- Evaluation of CNN architectures for identifying biomarkers related to COVID-19 via transfer learning techniques.
- Diagnosis of COVID-19 from small-sample X-rays achieving over 90% accuracy using VGG19 and DenseNet with just 50 images.
Support Vector Machines (SVM): These supervised learning algorithms seek to identify a hyperplane in N-dimensional space that maximizes the distance between data points of different classes.
- Early detection of COVID-19 using image sets derived from 150 CT scans, employing feature extraction methods.
Logistic Regression (LR): Commonly used for predicting classification probabilities, LR can also be utilized for identifying objects in images.
- Identification of clinical factors associated with severe COVID-19 pneumonia using LR.
Naive Bayes (NB): These straightforward Bayesian models can be integrated with kernel density estimations for accurate image classification.
- Classification of features extracted from CT images using NB.
Linear Discriminant Analysis (LDA): This method finds a linear combination of features to separate classes in pattern recognition.
- Analysis of blood changes in COVID-19 patients using LDA.
Decision Trees (DT) and Random Forests (RF): DTs analyze decisions to find the most probable strategy toward an objective, while RF comprises an ensemble of DTs.
- Severity assessments from chest CT scans of 176 patients.
- Large-scale COVID-19 screening system utilizing an "infection size-aware classification" method.
#### Drug and Vaccine Development
AI has been instrumental in identifying potential COVID-19 treatments among existing drugs, such as baricitinib, atazanavir, and afatinib.
- Deep Learning applications have led to the design of six new molecules that inhibit SARS-CoV-2 replication.
- Natural Language Processing (NLP) has revealed therapeutic agents through analyses of the PubMed database.
- Deep Learning techniques have accelerated the identification of targetable protein structures for vaccines from months to weeks.
- AI has also pinpointed viral protein epitopes that are likely to be immunogenic without cross-reacting with human proteins, aiding in vaccine design.
- Reverse vaccinology tools leveraging ML have identified genes coding for potential epitopes.
#### Outbreak Detection and Contact Tracing
AI systems in the U.S. and Canada utilize NLP to monitor social media and news for signs of emerging pandemics, aiding organizations like the WHO.
- Real-time contact tracing in Wuhan leveraged mobile phone data.
- Identifying high-risk individuals in Taiwan based on household registration and mobile data.
- AI-assisted models in Australia tested public health intervention effectiveness, revealing a 70% compliance rate was necessary to suppress the virus.
- Risk assessments across U.S. counties used extensive datasets to predict potential outbreaks.
#### Predicting Poor Patient Outcomes
- Acute respiratory distress syndrome risk assessed through data from 53 patients.
- Mortality risk prediction using key biomarkers from 404 patients.
- Long-term hospitalization risk predicted using CT imaging data.
#### Virtual Care and Remote Monitoring
Patients with COVID-19 who do not require hospitalization can be remotely monitored using wearable devices that track vital signs, relaying data to healthcare providers.
#### Hospital Management
- Dashboard tracking of hospital bed capacities and ICU distributions across the U.S.
- Geographical predictions of healthcare strain utilizing models to monitor ventilated patient distributions.
- AI robots for drug transport and disinfection to alleviate the workload of frontline medical staff.
Summary
This article is part of a three-part series exploring mathematical modeling and machine learning in various health contexts:
- Differential Equations Versus Machine Learning
- Mathematical Modeling Versus Machine Learning for COVID-19
- Upcoming: Mathematical Modeling Versus Machine Learning for Cancer
The overarching goal of mathematical models is to forecast COVID-19's spread and intervention strategies. Most models are based on the classic Susceptible-Infected-Recovered (SIR) framework, which can be extended to account for additional factors like incubation periods, quarantine, and immunity loss.
Machine Learning has found diverse applications, from medical imaging diagnostics to outbreak tracking, drug development, and patient outcome predictions.
I hope you found this article enlightening. Have a delightful holiday season!
Connect with me on LinkedIn, Twitter, and YouTube.