How Machine Learning Can Help Identify Adverse Drug Reactions



In this report, we explore how machine learning can help identify the possibility of adverse drug reactions (ADRs).

  • More than half of Americans regularly take prescription drugs—four of them on average—and 75% of Americans take at least one over-the-counter drug regularly.
  • About 53% of Americans who use prescription drugs get them from more than one provider and 35% state that a healthcare provider has never reviewed their medication to see if they could stop taking it.
  • Annually, US hospital emergency rooms see more than 1 million people for ADRs. More than a quarter of these patients need to be admitted for further treatment.
  • Machine-learning algorithms, such as the Apriori algorithm, can run through vast, unstructured data sets of medications, conditions, drug effects, patient histories and other variables, and calculate the probability of an ADR, to a certain degree.


Today, many of us enjoy the benefits of immense advances in health treatments. Sophisticated technology and the discovery of new drugs have increasingly enabled health professionals to customize therapies and medications for patients. In addition, some diseases have been nearly eliminated due to vaccination. Others, however, are becoming more complex, resilient and widespread. So, tailoring treatments according to each patient’s individual genetic and medical history is likely to become more important.

While prescribed medicines and treatments are meant to alleviate ailments, their effects are sometimes to the contrary. When a prescribed drug or treatment causes fresh or further harm unexpectedly, it is termed an “adverse drug reaction” (ADR). These are different from side effects, which can occur even when the right medication is prescribed and are usually expected, mild and self-resolving (although some can be severe). ADRs are typically the result of incorrect medication or dosage being prescribed, sometimes due to healthcare providers having to make decisions based on incomplete information, and they can be fatal on some occasions. Healthcare providers can sometimes reduce the effects of ADRs by lowering the dose of a medication or stopping it altogether, unless the ADR has already resulted in permanent damage.

In this report, we explore the prevalence of ADRs, how they are typically triggered, and how artificial intelligence (AI) and machine learning (ML) could be used to help reduce their occurrence.

More than Half of Americans Take More than One Prescription Drug

Many people have experienced health conditions that require them to take more than one prescribed drug at a time. In some cases, they take these prescribed medications in addition to health supplements and over-the-counter (OTC) drugs.

More than half of Americans regularly take prescription drugs—four on average—and 75% of them take at least one OTC drug regularly, according to an April 2017 Consumer Reports survey of 1,947 American adults. About 53% of those surveyed who use prescription drugs said that they get them from more than one provider, and 35% stated that a healthcare provider had never reviewed their medication to see if they could stop taking it.


Of course, not every combination of prescription drugs is harmful, but the more drugs a person takes, the higher the chance of an ADR occurring.

Prevalence of ADRs

Some of the less-severe signs of ADRs are skin rashes and dizziness, but these events can be severe on some occasions and result in life-threatening conditions. Annually, US hospital emergency departments see more than 1 million people for ADRs, according to a research paper published in JAMA (Journal of the American Medical Association) in November 2016. More than a quarter of these patients need to be hospitalized for further treatment, the research found.

ADRs result in significant costs in the US, where an estimated $200 billion per year is spent on unnecessary or improperly prescribed drugs and related medication, according to healthcare market research firm IQVIA. For context, the US Centers for Disease Control and Prevention (CDC) reported that the US spent $3.3 trillion on healthcare in 2016. Of that total:

  • Some 32%, or $1.1 trillion, was spent on hospital care.
  • Around 20%, or $665 billion, was spent on physician and clinician services.
  • About 10%, or $329 billion, was spent on prescription drugs.
  • The remainder was spent on dental, health, residential, personal care and other professional services.

In the context of these figures, the amount wasted on incorrectly prescribed medications and the treatments necessary to rectify their effects is very significant.

Among demographic groups, older adults are more susceptible to ADR events because people tend to take more medications as they age. The 2017 Consumer Reports survey found that more than 33% of US respondents aged 55 or older were taking at least five prescription drugs and that 9% were taking more than 10 prescriptions regularly.

Each year, more than 177,000 adults aged 65 or older visit US hospital emergency departments due to ADRs, according to the CDC. And people in that age group are nearly seven times more likely than people in other age groups to be hospitalized after a visit to the emergency room for ADR treatment, the CDC said.

Causes of ADRs

While some drug combinations are known to cause adverse reactions, in many circumstances, it is difficult for healthcare providers to determine the possibility of such reactions, as many variables are at play. These include:

  • Physiological factors: A patient’s age, gender, maternity status, body weight and composition, and history of allergies can affect the how a drug behaves in the body. For example, older adults tend to have smaller bodies and different body composition than do younger adults, as aging typically results in a reduction of fat and muscle mass and the lowering of one’s average metabolic rate. Therefore, the appropriate amount of drug per pound of body weight for an older adult will typically differ from that for a younger adult. The ability of the liver and kidneys to process medicines also decreases with age.
  • Presence of multiple health conditions: Some people may have more than one health condition that could affect the way drugs act in the body. One health condition could inhibit the efficacy of a drug meant to treat another condition.
  • Lifestyle and social factors: Individual lifestyles and social factors, including food and alcohol consumption, can adversely affect the absorption of prescribed drugs.
  • Negligence by patients: Patients may fail to take medicines in the manner prescribed by their healthcare provider or skip doses altogether.
  • Negligence by healthcare providers: Healthcare providers may fail to take necessary precautions or study patients’ history adequately. They may also fail to advise patients about the appropriate methods for taking prescribed drugs or fail to administer the drugs properly.
  • Patients’ failure to provide complete information: Some patients may inadvertently or intentionally fail to provide complete information about their past health history and lifestyle habits to their healthcare providers. If healthcare providers do not have all the information, they may be unable to advise patients properly.
  • Drug interactions: Some drugs can positively or negatively affect the functioning of another drug. If a drug inhibits the functioning of another drug, it can result in an ADR.

These are just some of the many variables that can contribute to an ADR, and combinations of these are unique to each individual. Healthcare professionals tend to be educated on potentially harmful drug combinations and instances that can cause adverse reactions. But memorizing all drug interactions and staying updated on the uses and effects of new drugs is a tedious and challenging task. Moreover, when healthcare providers see numerous patients every day, it is possible that they may fail to identify the likelihood of such reactions. (Some of the major possible ADRs of commonly used drugs are outlined in the appendix at the end of this report.)

Websites such as have drug interaction checkers that allow people to enter the names of drugs and check for possible interactions with other drugs, foods and beverages, and diseases or conditions, but the information provided is generic and not uniquely tailored to individuals. This information gap is where AI and ML can play a key role in helping to reduce instances of ADRs. Healthcare providers can use the technologies to better predict—and, so, better prevent—the occurrence of ADRs at the individual patient level.

Using ML to Help Quell the Chances of an ADR Occurring

AI, or machine intelligence, is human-like or intelligent behavior exhibited by computers and machines. It is enabled by computer programs that help machines make independent decisions through cognitive functions similar to those typically exhibited by human beings, such as learning, decision making and problem solving. Within AI, ML refers to the techniques used to perform cognitive functions.

So, how can AI and ML help quell the chances of an ADR occurring? AI and ML programs or algorithms can easily run through vast, unstructured data sets; study multiple variables; identify patterns; and calculate the probability of an event occurring and its outcome. These technologies are built into computer software that is designed to assist healthcare providers with decision making, such as clinical decision support systems.

Various ML algorithms have been created for use across different industries and sectors. These are divided into three broad classifications:

  1. Supervised ML algorithms: These programs make predictions based on a given set of samples, where the outcome is known or clearly defined. For example, a machine may be asked to pick out red blocks and blue balls from a collection of multiple objects in different colors. Because the program is given a set of labels to choose from—such as the color and shape of the objects—it is called a supervised algorithm.
  2. Unsupervised ML algorithms: These algorithms are used when there are no predefined labels. An unsupervised ML algorithm is used to process and sort data into clusters based on similarity between the data and the frequency of occurrence of associated items. For example, from a set of photographs of people, a program may be able to identify those who are smiling and those who are not based on studying facial patterns. In the case of a shopper who buys a bag of coffee online, a website’s built-in program may present the shopper with associated products such as milk and sugar thanks to an algorithm that has “learned” to do so based on similar purchase patterns from the same customer or other customers in the past.
  3. Reinforcement ML algorithms: These algorithms make decisions based on constant feedback and the effectiveness of the decision made, and then devise strategies to provide better outcomes. For example, they may be used to understand the best moves in a game of computer chess or to learn the best routes and speeds for self-driving cars.

There are many ML algorithms built for specific sectors, use cases and types of data under these broad classifications. The table below summarizes some examples of algorithms used in medical and nonmedical applications under each of these classifications.


An unsupervised ML algorithm called Apriori is most suitable for identifying potential ADRs, given the nature of patient data, the calculations that need to be made and the desired outcome.

The Apriori Algorithm and Its Application in Identifying ADRs
The Apriori algorithm works by creating association rules for a given data set that are generated in an “if, then” format, i.e., if A happens or is present, then B must happen or be present with a certain probability, or if A and B occur frequently, then C must occur frequently with a certain probability, and so on. The Apriori algorithm works on two basic principles:

  • All subsets of an item set that occurs frequently also occur frequently.
  • If an item set occurs infrequently, its supersets also occur infrequently.

The application of this algorithm could help prevent ADRs when physicians prescribe certain drugs or drug combinations. Below, we look at two examples of commonly prescribed medications, warfarin and tetracycline, and examine how the Apriori algorithm may be applied in the decision-making process in order to help prevent ADRs in patients who are prescribed these drugs.

Drug: Warfarin (sold under the brand names Coumadin and Jantoven)

What it is used for: Warfarin helps in thinning the blood. It is used to treat blood clots and to lower the chance of heart attack or stroke in some people.

Side effects: Some of warfarin’s many possible side effects are dizziness, excessive bleeding upon injury and severe headache. People who are of Asian descent or aged 60 or older could experience more side effects that could potentially be fatal.

ADRs: Warfarin is known to significantly interact with 214 drugs and drug combinations, as documented by online drug interaction checker Consuming foods rich in vitamin K, a nutrient that promotes clotting, could reduce the efficacy of warfarin. As a blood thinner, warfarin could adversely affect patients with severe diabetes or hypertension, as they may be at increased risk for hemorrhage.

Drug: Tetracycline (sold under the brand names Apo-Tetra and Nu-Tetra)

What it is used for: Tetracycline is used to treat bacterial infections and acne.

Side effects: Some of tetracycline’s many possible side effects are joint pains, sore throat and fever.

ADRs: Tetracycline can cause liver damage. It can cause adverse effects in people with diseases such as colitis (an inflammation of the colon lining), hepatotoxicity (drug-induced liver damage), renal dysfunction (improper function of the kidneys) and esophagitis (an irritation of the esophagus). The drug interacts moderately with multivitamins and mineral supplements.

Apriori Algorithm Application
When a doctor prescribes warfarin or tetracycline, and needs to decide the correct dosage and frequency regimen for a patient, he or she must consider various factors about the patient. Two patients may be the same age and gender and have a similar physiology but be of different ethnicities, which may affect the doctor’s decision. It is also possible that one patient may already be taking other medications and supplements that the second patient is not, or that the two patients have very different lifestyle habits. All of these factors form the item sets and subsets that the physician must consider before prescribing a drug.

A clinical decision support system that uses the Apriori algorithm can run through each patient’s medical history and consider all combinations of each patient’s characteristics, including other medications the patient is taking, and other variables and the frequencies of their occurrences. The algorithm helps the clinical decision support system calculate the probability of a particular ADR occurring and thereby helps the healthcare provider decide the appropriate prescription and treatment for each patient.

Limitations of ML in Identifying ADRs

Applying ML technology to help reduce the occurrence of ADRs is certainly useful, but the technology still has a ways to go before it can be deployed in mainstream healthcare IT systems. Existing challenges include:

  • Inadequate sample sizes: As organizations continue to migrate health records from paper to electronic form, the records are forming a vast and accessible data set to which ML algorithms can be applied. In addition, data on various health conditions, medications and their outcomes have been documented in research papers and other medical literature. So, there may be enough data available on commonly occurring conditions for various algorithms to be applied to those data sets effectively. However, in the case of rarer conditions, there may not yet be an adequate sample size of variables available to process combinations and likely probabilities to assist healthcare providers effectively.
  • The need for human intervention: ML algorithms can only assist healthcare providers in making a decision; the algorithms cannot decide the appropriate medication and dosage for a patient on their own.
  • Biased data: Because ML algorithms produce probabilities based on association between variables in a data pool, the data should be unbiased. Providing a system with excess variables for some drugs or conditions, or with too few variables, can result in manipulated probabilities of certain ADRs occurring.

What We Think

Healthcare providers need to make critical decisions nearly constantly, and they may not always be able to recollect all the possible effects and interactions of the drugs or drug combinations that they need to prescribe in order to treat patients. Staying updated on new drugs and complicated conditions is also time consuming, and many doctors and pharmacists already find themselves under tight time constraints.

Having a repository of relevant information handy is helpful for healthcare providers, especially when they are treating patients with multiple or serious health conditions. Programs that can crunch unique variables and provide the probability of a treatment’s efficacy or negative impact on a patient are beneficial to healthcare professionals who are making crucial decisions. But given the current limitations of ML tools and the possibility of them generating biased results, we think that the technology has not yet advanced far enough to function independently. Until that happens, healthcare providers will continue to use ML algorithms as secondary decision-making tools to support their own insight and expertise.