Machine learning (ML) is becoming increasingly available to everyone, including those who dedicate their work to the use of analytics in pharmacovigilance with the objective of increasing the benefit / risk ratio of a medicinal product.
Here we will explore ways of applying machine learning to drug safety and pharmacovigilance, specifically to the prevention of adverse events (AE) or adverse drug reactions (ADR).
What is Machine Learning?
In a straightforward way, we could say that ML is the application of common sense by computers. It mimics the process used by humans to make decisions (based on experience), by making decisions based on data.
ML has applications in many fields, including drug safety and pharmacovigilance. The following are some examples related to our field:
- Predicting which subjects or patients will experience an AE during a clinical trial.
- Predicting which patients are more prone to discontinue from a clinical trial.
- Predicting which individuals have a greater probability of failing at the screening / pre-randomization phases of a clinical trial.
- Detecting which patients are going to benefit more from a specific treatment.
- Identifying the characteristics / risk factors of individuals having a greater probability of experiencing an AE in the post-market setting.
- Processing individual case report (ICSR) narratives to extract the most notable features.
- Segmenting individuals based on their probability of experiencing a serious adverse event (SAE).
Machine Learning Models in Pharmacovigilance
There are different machine learning models, and all of them can be applied to pharmacovigilance analytics. Here we are talking about supervised learning, unsupervised learning, semi-supervised learning, and reinforcement learning. We will use the concept of “label” to differentiate supervised from unsupervised learning. In machine learning, a label is the classification names or the group names we want to learn to predict. For example, labels for variable seriousness of an adverse event would be ‘serious’ or ‘nonserious’; for variable severity of an AE, they would be ‘mild’, ‘moderate’, or ‘severe’.
In this model, the labels are not known by the model. For example, if we want to determine who experienced an AE based on a set of variables, but we do not provide this information to the analytical model, we are performing an unsupervised analysis. Algorithms are used against non-labeled data.
Some techniques are:
- Cluster analysis
- Outlier detection analysis
- Association rule mining
- Dimensionality reduction (principal component analysis, random projection, independent component analysis)
In this case, we provide the labels to the algorithm, to see if it can predict correctly which label belongs to each individual. As an example, we provide a series of variables associated with patients who experienced an adverse event, and the same set of variables for the patients who did not experience an adverse event. The model will try to predict which individuals will experience an adverse event.
Some techniques are:
- Classification (decision trees, random forest)
- Regression (linear regression, logistic regression)
The goal here is to learn a better prediction model than based on labeled data alone. So, we combine labeled data with unlabeled data for that purpose. In drug safety and pharmacovigilance, sometimes cases have lack of information, data are incomplete. We can develop predictive models in these circumstances with semi-supervised learning algorithms.
Some techniques are:
- Semi-supervised support vector machine
- Graph-based methods
The objective here is to achieve optimal decision making based on prior experience. It uses feedback to improve predictions. It is used frequently for precision medicine purposes. Clinical decision making is often difficult because of the diversity and complexity of patients. Specific patient traits or characteristics give place to specific and more targeted treatments.
It would be great if we could tailor a treatment in such a way that we could prevent the appearance of adverse events.
There are several key elements of reinforcement learning. Reinforcement learning systems are comprised of a policy, a reward signal, a value function and an environment model.
These models are used to solve complex decision making where trial and error is acceptable.
Reinforcement learning can be applied to analysis in pharmacovigilance. There are several potential applications in this area:
- Signal Detection: Reinforcement learning algorithms can be trained to identify signals of adverse drug reactions (ADRs) from large and complex datasets, including electronic health records, drug databases, and patient registries. By iteratively adjusting their strategies based on feedback, these algorithms can become more effective in detecting rare or novel ADRs.
- Risk-Benefit Analysis: Algorithms can learn to balance the risks and benefits of drugs by analyzing outcomes from various patient demographics and conditions. This approach can help in making more personalized recommendations regarding drug safety.
- Optimization of Drug Safety Monitoring: Reinforcement learning can be used to optimize the process of monitoring drug safety, such as determining which data sources to prioritize or how to allocate resources effectively for investigating potential drug safety issues.
- Predictive Modeling: Algorithms can predict potential adverse reactions before they are widely reported by analyzing patterns in data. This predictive capability can be vital in preventing widespread harm from newly released drugs.
- Automating Routine Tasks: Routine tasks in pharmacovigilance, like data entry and initial report triaging, can be automated using reinforcement learning, thereby freeing up human resources for more complex analysis.
- Adaptive Learning from New Data: As new data becomes available, reinforcement learning algorithms can adapt and improve their predictions and analyses, which is crucial in a field where new drugs and new information about existing drugs are constantly emerging.
- Patient-Specific Recommendations: These algorithms can help in tailoring drug safety monitoring and recommendations to individual patient profiles, considering factors like genetics, existing conditions, and concurrent medications.
However, the application of reinforcement learning in pharmacovigilance must be approached with caution. The algorithms require large amounts of high-quality data to learn effectively, and there are significant ethical considerations regarding patient privacy and data security. Additionally, the decisions made by these algorithms can have serious health implications, so rigorous testing and validation are essential before they are deployed in real-world settings.