The goal of this post is to go a bit beyond the twenty line press releases served to diabetic communities and try to explain in simple terms some of the concepts and some of the limitations of APs. Please do keep in mind the following limitations about this post itself:
- while I read an awful lot, I am not involved in AP research.
- now that the smell of dollar is on the horizon, a lot of the recent research has gone underground. There could very well be a breakthrough lurking somewhere that I am unaware of.
A simple problemThe problem an artifical pancreas tries to solve is simple: keep your blood sugar in an optimal range. It is so simple that it was solved, somewhat impractically, by Dr Kadish in 1964. This evolved into the biostator (full article) in the seventies and in closed loop research systems such as the ones used in clinical studies or insulin characterization studies. They are impractical for normal life use – think very noisy fridge like impractical - but invaluable for research where constant levels of either glucose or insulin infusion have to be maintained. So, why has it been so hard to develop a portable AP system? After all, it seems that the machines described above have solved the issue? To understand a bit more, let’s look at what controlling a loop implies.
The PID Controller
One way to control a system is through a so called “PID controller” where PID stands for “proportional – integral – derivative”. I imagine that some of you are already about to run away at the mere mention of integral and derivatives but bear with me for a minute: a PID controller is simply a formal way to ask three simple questions (and hope for a correct answer) in a never ending loop.
- where do I stand now compared to where I want to be? Try to adjust.
- how did my previous stage 1 corrections work? Try to adjust.
- where will I stand in the future if I continue to correct based on 1 and 2? Try to adjust.
That’s not too hard, is it? In fact, you probably have been the PID controller of your diabetes for ages. It could also be said that, when you had a fully working pancreas, it was, in a way, a PID controller itself, constantly adjusting the level of hormones to achieve a stable level.
If we had a complete set of correct information and an immediate way of acting on the parameters, a PID controller could work very well. Robots and drones make heavy used of PID controllers (or more advanced variants). But, in diabetes management, we do not! Our BG level information is partial and somewhat inaccurate. We can’t dose Insulin in a timely and precise enough way to be the perfect PID controller.
The clinical devices described above have the advantage of near immediate delivery, directly into the bloodstream, of precise doses of glucose, insulin and glucagon. So, PID would be nice, but we can’t really use it as such in real life. What else can we do?
MPC (and variants such as Robust MPC, Constrained MPCs, etc)MPC stands for “Model Predictive Control”. As you can see from the name, a MPC controller relies on observations in the framework of models to issue predictions and act upon them to put you in the desired range. Models exits for glucose homeostasis, insulin absorption and dynamics, and tons of other things.
Going back to our car example, we would use, as a elements of our model, the weight of the car, the power of its engine, the grip of its tires, the position of the accelerator pedal and the air resistance to predict where the car would be after 10 seconds if we accelerated on a standard straight road. Or, if we were driving at 160 km/h, we could simply calculate a new accelerator pedal position that would let us slow down to 120 km/h and then again a new position to keep that speed.
MPC models work extremely well in the industry where they deal with well defined mechanical systems, linear (directly proportional) responses and fairly simple (at least compared to the messy soup a biological system is) chemical reactions.
In the field of diabetes, many of the model parameters have been determined empirically. Their variability has been poorly characterized (in part because studies are small and expensive). They did get a lot of attention though, in part because people who have devoted their lives to the development of models are often emotionally attached to them… but the truth is that they don’t work that well in practice (the old “consider a spherical horse” story)… Why? Here are some of the reasons…
- human variability: one could roughly say that any biological parameter varies +/- 50%. You can be 140 cm tall just as you can be 210 cm tall and be perfectly fine samples of the human race. Some people metabolize alcohol faster than others, some transport B1 into cells at a faster rate than others, as we have seen in a recent complication study. It boils down to genes, their expression, the regulation of their expression, etc… The same variability occurs at many levels in diabetes: the liver at rest and the liver during exercise are like Dr Jekyll and Mr Hyde.
- site variability: that’s an easy one. Injections sites aren’t equal. Tubes get clogged.
- unknowns: there is still a lot we don’t know about many of the physiological mechanisms involved and how they change in different circumstances.
- physiological: a model can be perfectly valid in a certain range and suddenly become totally invalid in other ranges.
- being alive: stress, exercise, intercurrent infections can completely change the dynamics at any given time.
- mathematical: in some cases, the math just fails.
|Toying with parameters in the iHOMA2|
You have also been the MPC controller of your diabetes. Your mental model tells you that you should probably reduce your insulin dose before you exercise, that you are likely to go low after a long shopping afternoon, etc… If you have a wrong mental model, you will have poor control. The same holds true for a MPC based AP.
Informed or uninformed.Until now, we have talked about “ignorant” or “uninformed controllers”. If we had both exact information and immediate way to act on it, a perfect PID controller such as the pancreas would not care about being explicitly informed. The indirect information – stress hormones going up for example – is automatically perceived and acted upon.
On the other hand, even a “perfect” MPC controller, if such a thing existed, would care a lot about information. It is all very good to have a model of intestinal carbohydrates absorption but it does not help much if the algorithm does not know how many carbs you just ate. Except, of course, that the data is subject to the same uncertainties, inter-individual variable absorption, etc... The list is, of course, endless but it is obvious that even if we had a perfect MPC controller, we would have to assist… assist so much that we would become a slave to our controller… An AP should make your life simpler, not harder. There is, we are told, some good news on that side though: heart rate and skin are a good proxy for exercise and stress and our sensors are getting smaller and better. Maybe five years from now? (cough, cough)
Mixed models and other approachesWell aware of the above shortcomings, researchers have developed hybrid models that try to combine the advantages of PID and MPC controllers, while minimizing their drawbacks.
Other approaches such as neural network based pattern recognition have been studied and may, one day (cough, cough again, five years from now?), be actually helpful. This is probably what Medtronic is trying to achieve by partnering with IBM’s Watson team. Artificial Intelligence on Big Data has one big advantage: no one really fully understands how it works… (LeCun) It is a bit like magic and, as such, the perfect destination for all our irrational hopes.
Fractal Control, subspace-based linear multi-step predictors, stochastic differential equations based models, adapted constrained weighted recursive identification methods and GPC, etc…, etc… the list of options is nearly endless. While I do understand the rationale (and sometimes the math!) behind some of those, telling the research that can actually have an impact from the utilitarian “let’s publish something catchy” is extremely hard. You got to know where your utter incompetence begins and, at this stage, I will draw the line.
The deeper problem with modelsNow that we have a rough overview of the basic ideas behind some models, let me give you some food for thought…
How have those intrinsically imperfect models been validated until very recently? Well, you guessed it: they have been mostly validated against a patient model (UVa/Padova Patient Simulator). That approach is not totally without merit but is far from perfect.
Imagine yourself in a world, constantly covered by thick clouds, that has computers but no theory of gravity. As you work to discover Newton’s Laws, another team implements a solar system model based both on the same starting set of assumptions and, as you progress, on your recent discoveries. Then, from time to time, you double check your theory against the model, exchange ideas and restart another cycle. Chances are they will agree. But what does that really mean? What will change when you rise about the clouds and discover the real solar system?
In the past, a lot of the control algorithms research went a bit like this:
- X develops a model of glucose absoption, insulin action, insulin-glucagon interaction… That model is partially, or even mostly, validated for a single meal in stable conditions.
- Y develops a control model based on X’s model.
- Z develops a patient model based on X’s model.
- Y tests its control model on Z patient model and promptly publishes an enthusiastic paper.
Can you spot the catch? Of course, there’s no intention to mislead and researchers are fully aware of the problem. That is why they are constantly fine tuning and updating both models. Until recently, they had no choice. It was practically and ethically impossible to run tests on real patients. That model on top of a model research did yield interesting results which were widely echoed. But limitations rarely make it in enthusiastic press releases whose cumulative impact has now set AP expectations too high.
Lastly, the idea that an ideal model can be approached and that all patients will somehow find themselves in some gaussian cloud around that ideal line at all times is, in itself, probably deeply flawed (possible material for another blog post).
Hey, whiner, were do you stand? Complexity or simplicity?At this point, you may think that I am just a random guy being grumpy and overly negative about the AP control algorithms… Well, there is some truth to that. So what do the other say?
Well, the published results so far have been nicely summarized in the recent coverage of the annual JDRF report.
"At ATTD, Dr. Buckingham also shared the first-ever insulin-only data on the Bionic Pancreas. The headline? The insulin-only system showed roughly similar efficacy in pilot studies to other published systems: an average glucose of ~154-161 mg/dl (depending on the target glucose), with just ~1-3% of the time spent <70 mg/dl."
Depending on your mood, the glass is either half full, or half empty… On one hand, it seems the AP is finally coming. On the other hand, it is a bit disappointing to see that, after so many years and so many nice looking model on model results, we are still seeing real life results that are above the recommended guidelines. Yes, things will improve. They always do. CGMs could be better than they are today if we did not have to suffer the consequences of patent wars. Patience. Let’s wait another five years (cough, cough).
But beyond the disappointing results, the fact that the bionic pancreas system showed roughly similar efficacy to other single hormone AP systems is a bit worrying. It seems to indicate that, despite using different approaches and controller mixes, there is some kind of fundamental block in the curren strategy. Possibly the block evoked in the previous paragraph. Possibly something less fundamental that some algorithm I do not understand will overcome.
Am I overly pessimistic? At least, I am not alone.
Am I overly pessimistic? At least, I am not alone.
As H. Kirchsteiger summarized in the recent “Prediction Methods for Blood Glucose Concentration” (note: some of the book chapters are way too hard for me to understand fully)
“Unfortunately, in spite of 40 years of research, the results of this “artificial” or “virtual pancreas” are still not there where they should be and simple safety rules –e.g., avoiding insulin infusion during or near to hypoglycemia- seem to be able to offer the largest parts of the benefits of closed loop control in a much simpler way as well”
That is, in a way, a confession. The kind of confession you only can make behind semi closed doors, to an audience that knows that you are correct. Maybe a low glucose threshold suspend is all we need after all. Maybe the comparatively unsophisticated DIYPS will match the fancy research results.
RisksOne other aspect I’d like to address is the issue and perception of risk. It can be summarized, in the average patient opinion, by this statement.
“My CGM was off by 80 points this morning! How could I ever trust an AP relying on crappy data”.
Rest assured that CGM off by 80 points do piss AP researchers tremendously as well. However, those guys are not stupid. They don’t treat CGM values as gospel. Fighting on their side are many mathematical tools that can give them a good idea of the trustworthiness of what the CGM reports. Is the signal of the sensor noisy? Does what the sensor reports diverge too much from what the model (!) or the recent past situation indicates? Are we in presence of a known issue such as a severe compression? Is what we are seeing even remotely physiologically possible? Etc…
There’s also the notion of the potential “cost” of a decision. Not the financial cost – although it could be if their company is sued in a wrongful death. Not, strictly speaking, “cost” as it is defined in the theory of control system (although it is related), but the potential clinical cost or risk of a wrong decision.
How costly is a decision? Failing to predict that your BG will reach 300 and “only” correcting for 200 carries a small health cost. Failing to predict that an 80 is heading to 56 potentially has a huge cost. The risk associated with a decision has a tremendous impact on whether that decision is taken or not taken. That extreme risk aversion explains why all current clinical tests seem to converge around the same values. It is also the demonstration that the current approaches are nowhere where we hoped they would be in 2016.
In fact, I am willing to bet that, if we had held a referendum asking people what their “safest” value is, regardless of other concerns, it would have been in the 140 to 160 range.
In short, there are real risks: an AP can go on the wrong path. Just like a pump can clog. But rest assured that most, if not all teams, have the simple cases covered and a wide safety margin.
I fell obliged to mention that I am aware that some of the artificial pancreas teams have made public claims of better results (but not published results or launched clinical trials). While I do not doubt the integrity of people who made those claims, their sample population is obviously extremely biased: people who have access to either the open source artificial pancreas or pre clinical trial models are, without any doubt, at the very top of the pyramid of diabetes management abilities. It remains to be seen if those mouth watering claims can be replicated in an average population.