Cor: A Health System Using AI and IoT Technology

Imran Iftikar
7 min readFeb 6, 2021

*** This Article is entirely conceptual and was written for a Hackathon. Please keep this in mind as you read.

Healthcare is something that everybody needs — but it can be clunky, and inefficient. If you’re feeling unhealthy and showing symptoms of any given ailment, the go-to course of action for most is to go to the doctor’s office. You get a diagnosis, prescribed medication if you need it, then you go back home. Problem solved.

Unfortunately, the process of diagnosing a patient and prescribing medicine is rarely so cut and dry. It’s based on the observations of a doctor and the patient’s ability to communicate their symptoms. This process is prone to errors, and initial diagnoses may or may not be correct.

My team and I aim to change this by using a novel, mathematical, data-driven system, which includes elements of IoT technology and AI.

Introducing: Cor

By using sensors connected to the internet to gather raw data anywhere at any time, Convolutional Neural Networks to analyze data and create a diagnosis, and Reinforcement Learning to generate a prescription that is both safe and effective, we can revolutionize how healthcare is treated.

For the sake of this explanation and understanding, we’ll go over how our system is applicable in the case of a heart attack.

Heart attacks are very deadly, this goes without saying. In fact, cardiovascular disease accounts for a staggering one fourth of the deaths that take place in the United States — that’s 655,000 people per year. What’s even more frightening, however, is the fact that of the 805,000 annual heart attacks occurring in the U.S., 1 in 5 goes unnoticed. These silent heart attacks might not interrupt your day, but they lead to significant damage to your heart. They affect our bodies without us even realizing and without the presentation of symptoms, and often go untested save for an annual check-up at the doctor’s, by which time irreversible damage could have been done to your body.

How, then can we actively, anywhere and anytime, determine if you have a heart attack? It’s pretty simple — we can use the system my team and I have created.

The IoT Aspect — Alayo Oloko

The Internet of Things, or IoT, refers to a network of devices and sensors that send data through the internet, to be used to inform an action.

Telling an Alexa device to turn on the lights would be using IoT, because Alexa’s sensors take the data from a command, analyze what is said, and use that information to commit the act of the lights turning on.

Cor’s system will function with the Internet of Things, starting by gathering health data from the user through multiple health sensors. The first of these sensors will be a heart rate monitor which is a common feature of many smartwatches and fitness trackers such as an Apple Watch or a Fitbit.

These sensors will connect to the internet via Bluetooth so they can communicate their data to the AI algorithms that will further process them to analyze the user’s heart health.

The CNN Aspect — Henry Huang and Anant Kovil

Next, our sensor data is used to come up with a diagnosis. To accomplish this, we will use Convolutional Neural Networks or CNNs. They work by using convolving kernels over an image to detect features.

If that last sentence made no sense to you at all, don’t worry — this can be an initially confusing concept. Here’s a way to help wrap your head around this. Think of a magnifying glass on a table — you can clearly see one part, but not the rest. The image would be the entire desk, and the magnifying glass would be the kernel. When we move the magnifying glass over the desk to see more is what convolving is. Our algorithm uses this magnifying glass to spot essential patterns within EKG data.

But how does our network train to recognize each of these patterns? Our CNN takes the input and multiplies them with numbers called “weights.” These signals are summed and passed to the second connection weight matrix. Each successive layer multiplies each node with its respective weight and passes the output to the next layer. In the training stages, the output received by the final layer will determine whether it has trained correctly or incorrectly.

If it is trained correctly, nothing will change. It is trained incorrectly, it will determine what it got wrong and the error will be passed backward through our network. The weights in each layer are adjusted to reduce the amount of error for the next cycle and this process repeats until the weights are assigned to their optimal state.

Then, data can be passed and the network can make a reasonable inference about said data.

In our case, our network will determine whether or not our heart rate data is indicative of any heart problems or not. If there aren’t any, that’s great. If there are, we have another algorithm for recommendations and a prescription.

The RL Aspect — Imran A. Iftikar

Lastly, we use Reinforcement Learning, or RL, to make a prescription or a set of recommendations based on the diagnosis and additional medical data, such as the user’s medical history.

Reinforcement Learning is a very special type of AI, in that it is very similar to how humans learn (it could potentially be a key to creating AI that can do anything a human can!).

In RL, an agent will interact with its environment to get more rewards. What do I mean by this?

Let’s say you plopped a six-year old in front of a video game. Over time, it would understand that when it completes a level, it gets points, and when it dies, it loses points, and would thus optimize to try to complete as many levels as possible to get more rewards.

An actual agent learns much better than humans, though, and can outperform them in decision making. For example, RL algorithms beat a world champion at the game Go and also beat a professional player at the video game Dota 2. Other uses of RL include autonomous vehicles, finance, control theory, and game theory.

It can also be used in prescribing medications with greater accuracy than doctors. In our example, where a patient has a silent heart attack, the RL agent would simply say “go to the hospital for further care” as that would be the smartest thing to do in such a situation.

However, there are other, more nuanced examples. For example, in the ICU, RL was used to describe heparin dosages with greater accuracy than doctors. Another example could be anesthesia — there are considerable risks when overdosing or microdosing, so it’s very important that the dosage is optimal.

Conclusion and Next Steps

Our system can revolutionize personal healthcare. Although it won’t replace the current healthcare system, and doctors will still be necessary, this workflow can be used for chronic illness, critical care, for anything health-related at all. Still, we are barely scratching the surface of this system. Take water purification plants: we get data from the water using IoT, analyze it using CNNs, and determine the next steps using RL (the RL portion has already been done in this study).

There are still challenges to implementing this workflow, mainly with getting it to fit with our current infrastructure. To use this, many existing systems would have to be adapted. Finally, we are giving the RL a human’s job — to control what should be done based on data and diagnostics — but humans will still have to check the results of it, at least in the early stages, to ensure safety.

Regardless, the applications of this system are vast, and will one day touch numerous aspects of our lives.

This article was written by Alayo Oloko, Imran Iftikar, Henry Huang, and Anant Kovil:

You can find Imran: On Medium, On Twitter, On Instagram, On LinkedIn, and On His Website

You can find Alayo: On Medium

You can find Henry: On Medium

You can find Anant: On Medium

--

--